title: Checking when BufferedReader readLine() is empty
body: <p>I am working on a tcp server/client application using sockets in Java.  </p>
  
  <p>I am checking the input from the client to the server.<br>
  Each time that the client writes something the server has to print it on screen.<br>
  That part is done.  </p>
  
  <p>But it is also required that if the client does not write something in 120 seconds the server must terminate the connection with the client. I tried to resolve this by checking if <code>readline().isEmpty()</code> is null but I've read that the <code>bufferedReader</code> "blocks" if information is not being received.  </p>
  
  <p>So how should I resolve this problem?</p>