Hi. I'm using a bufferreader with the readline routine to read data from a socket. My problem is that when I get to the last line to be read it hangs as if it is waiting for the line to come through. The documentation seems to suggest that a null should be returned when the end of the stream is reached but this does not seem to be the case. Also, using Bufferreader.ready() doesn't work either.
Here is the main loop of the code:
Thanks in advance for your help. Durkin
Here is the main loop of the code:
Code:
String s;
BufferedReader in;
in = new BufferedReader(new InputStreamReader(skt.getInputStream()));
while (s != null){
s = in.readLine();
}