I'm using java's InputStreamReader read() function. When I reach the end of the input stream i'm supposed to get in to my int variable the value of -1, but instead it goes to block. Why don't I get a -1 at the end of the input stream? (i've debugged it letter by letter making sure it is actualy the end of the input and that the connection socket is alive).
Is using the ready() function a good solution by doing:
if (isr.ready())
currCharVal = isr.read();
Thanks in advance, Guy.