Hello,

is anybody to help me with reading 332 bytes from Socket client when I
send aswear 0xD9,0x30 to Server.
I need to receive as byte Array type.

my Client code:

final byte comand_out_30[] = {(byte) 0xD9,0x30};
..
try {
  s = new Socket(fadresa, fport);
  OutputStream writer = s.getOutputStream();
  InputStream reader = s.getInputStream();
  writer.write(comand_out_30);
  writer.flush();
  //reading
  byte [] b = new byte[332];
  int nosRead = reader.read(b);
  //
  reader.close();
  writer.close();
 } catch (UnknownHostException e) {
  // TODO Auto-generated catch block
  //e.printStackTrace();

 } catch (IOException e) {
  // TODO Auto-generated catch block
  //e.printStackTrace();
} finally
..
..

B.R.
Matej

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to