docs: public static void writeToOutputStream(String s, OutputStream output, String encoding) throws IOException {
  		BufferedReader reader = new BufferedReader(new StringReader(s));
  		PrintStream writer;
  		if (encoding != null) {
  			writer = new PrintStream(output, true, encoding);
  		}
  		else {
  			writer = new PrintStream(output, true);
  		}
  		String line;
  		while ((line = reader.readLine()) != null) {
  			writer.println(line);
  		}
  	}