code: public void save(OutputStream stream, boolean header, boolean flush) throws IOException {
          OutputStreamWriter out = new OutputStreamWriter(stream, "UTF-8");
          save(out, header, flush);
      }
docs: Save this XML into the supplied output stream.
  @param stream the output stream
  @param header write the header?
  @param flush flush after the save?
  @throws IOException on error