code: public static Writer newWriter(OutputStream stream, String charset) throws UnsupportedEncodingException {
          return new OutputStreamWriter(stream, charset);
      }
docs: Creates a writer for this stream using the given charset.
  
  @param stream the stream which is used and then closed
  @param charset the charset used
  @return the newly created Writer
  @throws UnsupportedEncodingException if an encoding exception occurs.
  @since 2.2.0