title: reading inputstream of a socket
body: <p>I have snippet</p>
  
  <pre><code>try {
      is = new BufferedReader(new inputStreamReader(getSocket().getInputStream()));
  }
  catch(IOException e) {}
  while(true) {println(is.readLine());}
  </code></pre>
  
  <p>Basically, I'm tring to println every single message that is sent to the input stream of the socket returned from getSocket().
  My question is: </p>
  
  <ol>
  <li>If there is no message sent to the socket, what value is returned
  from calling the readLine() method? Is it the null value or a null
  string (i.e. "") or is it something else? </li>
  <li>When a message has been
  sent and has been printed out, what happened to the input stream of
  the socket then? Is it emptied out?  </li>
  <li>Do we need a way to check to
  only call the println() method only when the input stream HAS
  something to print out?</li>
  </ol>