PrintWriter essentially provides convenience methods around Writer. If you do not need this convenience method, but you just need to write the characters, then functionally you can use any taste of the Writer created, including the "raw" OutputStreamWriter.
If you write characters one at a time and the socket stream is not buffered, then it would be wise to put some buffering somewhere using a BufferedWriter or wrapping a BufferedOuputStream around your original output stream. An example of where you usually do not need to do this is in the servlet, where the streams passed to your servlet are usually already buffered.
PrintWriter also has a “function” for catching exceptions for write methods, which you should then explicitly check with checkError () [hands up, who actually does this, and who just assumes the write succeeded ...]. This may or may not be desirable ...
source share