S
stathis gotsis
Hello,
I have the following segment of code in a program:
in = new BufferedReader(new InputStreamReader(
mailSocket.getInputStream()));
,in which a mailSocket is an object of Socket class.
Later on, i am using this expression:
while ((serverOutput = in.readLine()) != null)
System.out.println(serverOutput);
/*other stuff here*/
,wanting to print all the lines available on my end of the Socket at the
time being. This readLine() method is blocking, thus preventing the program
from getting on to the other stuff. How can i avoid this?
Thank you for any help
I have the following segment of code in a program:
in = new BufferedReader(new InputStreamReader(
mailSocket.getInputStream()));
,in which a mailSocket is an object of Socket class.
Later on, i am using this expression:
while ((serverOutput = in.readLine()) != null)
System.out.println(serverOutput);
/*other stuff here*/
,wanting to print all the lines available on my end of the Socket at the
time being. This readLine() method is blocking, thus preventing the program
from getting on to the other stuff. How can i avoid this?
Thank you for any help