code: public static Writer getOutputStreamWriter(OutputStream out) {
      try {
        return new OutputStreamWriter(out, "UTF-8");
      }
      catch (UnsupportedEncodingException ex) {
        throw new RuntimeException(ex); // shouldn't happen since UTF-8 is supported by all JVMs per spec
      }
    }
docs: Returns a writer for the specified output stream, using UTF-8 encoding.
  @param out the output stream to wrap
  @return a writer for this output stream