code: public static void copy(Reader reader, OutputStream out) throws IOException {
      copy(reader, getOutputStreamWriter(out));
      out.flush();
    }
docs: Copies the content of a reader to an output stream.
  @param reader the reader to read
  @param out the output stream to write
  @throws java.io.IOException if an I/O error occurs