code: protected PrintWriter newPrintWriter(Socket socket) throws IOException {
      return new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);
    }
docs: Returns a new {@link PrintWriter} to write to the {@link Socket#getOutputStream()}.
  
  @param socket {@link Socket} to which the {@link OutputStream} is written.
  @return a new {@link PrintWriter} to write to the {@link Socket#getOutputStream()}.
  @throws IOException if an IO error occurs while writing to the {@link Socket}.
  @see java.io.PrintWriter
  @see java.net.Socket