B
Boki
Hi All,
My last step, collect the input steam ( data ) to a jpg file,
could you please help to finish it ? thank you very much!
//--------------------
....
public InputStream in;
private StreamConnection con = null;
in = con.openInputStream();
....
//------------------
....
// collect input data to jpg file
try{
int bytesToRead = in.available();
if (bytesToRead > 0) {
// Initialize buffer
byte[] byteBuffer = new byte[bytesToRead];
// Read bytes
int nbrOfBytesRead = in.read(byteBuffer);
String str = new String(byteBuffer);
}
}
------------------
My last step, collect the input steam ( data ) to a jpg file,
could you please help to finish it ? thank you very much!
//--------------------
....
public InputStream in;
private StreamConnection con = null;
in = con.openInputStream();
....
//------------------
....
// collect input data to jpg file
try{
int bytesToRead = in.available();
if (bytesToRead > 0) {
// Initialize buffer
byte[] byteBuffer = new byte[bytesToRead];
// Read bytes
int nbrOfBytesRead = in.read(byteBuffer);
String str = new String(byteBuffer);
}
}
------------------