code: public static void copy(InputStream in, Writer writer) throws IOException {
      copy(getInputStreamReader(in), writer);
      writer.flush();
    }
docs: Copies the content of an input stream to a writer.
  @param in the input stream to read
  @param writer the writer to write
  @throws java.io.IOException if an I/O error occurs