docs: public static Writer encodedOutputStreamWriter(OutputStream stream, String encoding) throws IOException {
      // OutputStreamWriter doesn't allow encoding to be null;
      if (encoding == null) {
        return new OutputStreamWriter(stream);
      } else {
        return new OutputStreamWriter(stream, encoding);
      }
    }