// otherwise createWriter(Writer) inserts a buffering,
// so no point in doing a buffering here.
if(encoding.equals("UTF-8")) {
Encoded[] table = context.getUTF8NameTable();
final UTF8XmlOutput out;
if(isFormattedOutput())
out = new IndentingUTF8XmlOutput(os, indent, table, escapeHandler);
else {
if(c14nSupport)
out = new C14nXmlOutput(os, table, context.c14nSupport, escapeHandler);
else
out = new UTF8XmlOutput(os, table, escapeHandler);
}
if(header!=null)
out.setHeader(header);
return out;
}
try {
return createWriter(