Configured with three variables passed to the constructor:
indent
: a String
added at each level
of output; e.g. two spaces or a tab
lineSeparator
: the String to break lines with,
no line breaking is performed if this is null or the empty string
encoding
: The name of the encoding to use for output; e.g.
UTF-16 or ISO-8859-1
The output()
method writes a Document
onto a given
OutputStream
:
public void output(Document doc, OutputStream out, String encoding) throws IOException
public void output(Document doc, OutputStream out) throws IOException