public void output(Document doc, OutputStream out)
    throws IOException {
    Writer writer = makeWriter(out);
    output(doc, writer);  // output() flushes
  }
public void output(Document doc, OutputStream out)