title: PrintWriter println(String s) method: \r\n not supported?
body: <p>I'm creating a multithread chat client server application.
  In the server connection I use PrintWriter println(String s) method to write the response to the client.</p>
  
  <pre><code>PrintWriter out;
  String msg = in.readLine();
  String response = "";
  if (msg.startsWith("nick: ") {
      response = protocol.authenticate(msg); //returns a String that says "welcome " + nick
      //if there are messages pending for the author who logged in add them to the response String
           response+="\r\n"+textmsg;
  } else { ... }
  out.println(response);
  </code></pre>
  
  <p>When I run the client, who uses the BufferedReader readLine() method to read from the server, I get the welcome message but not the pending message for the client, but If I use</p>
  
  <pre><code>response+=textmsg;
  </code></pre>
  
  <p>it works, so I assume it's because I'm using \r\n but I still need to print a new line between those two messages. What should I do?</p>
  
  <p><strong>Edit</strong> after accepting the answer: In the end I chose to use OutputStream and InputStream so I can send every kind of string I want, even with \r\n.</p>