I have the following example of reading from a buffered reader:
while ((inputLine = input.readLine()) != null) { System.out.println(\"I got a message from
input reader is connected to the socket, which is a listener, i.e. keeps listening to incoming messages.
input
About your second question, you should put a try/catch block inside the method, catch the Exception and handle it. Do not re-throw it.