hey !

i try to read all the data of an open socket. but i am not able to get all the 
data till the end.
can somebody help me ?

my code :

SocketConnection socketConnection = (SocketConnection) 
serverSocketConnection.acceptAndOpen();
OutputStream out = socketConnection.openOutputStream();
InputStream in = socketConnection.openInputStream();

int bytesRead = 0;
byte[] buffer = new byte[5];
String data = "";

while((bytesRead = in.read(buffer)) != 0){
    data += new String(buffer);
}

System.out.println(data);

i am not getting to the end of the stream.

thx for helping !

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to