title: BufferedReader read() and readLine() both hang trying to get a response from a POP3 server
body: <p>I'm developing a small terminal app that handles interactions with a POP3 server. However, I'm having a problem where both read() and readLine() from BufferedReader block. My initial attempts used readLine(), but after reading on SO and other sites, I figured that the <strong>server isn't returning the appropriate characters to mark the end of the line, so I attempted to use read(). But for some reason, that blocks as well.</strong></p>
  
  <pre><code>    Socket s = new Socket(InetAddress.getByName(this.HOST), 110);
  
      BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
      PrintWriter out = new PrintWriter(s.getOutputStream(), true);
  
      String res = in.readLine(); // This works fine
      System.out.println(res);
  
      res = "";
      char [] charRes = new char[1024];
  
      out.println("USER " + this.username);
      // res = in.readLine();
      in.read(charRes); // Does not work
      res = charRes.toString();
      System.out.println(res);
  </code></pre>
  
  <p>The problem is not with the server because I tested it using Telnet and it works fine. I'm not sure what I'm doing wrong and I would appreciate any help.</p>
  
  <p>My client software is running on a Linux system and I am connecting to a Windows server.</p>