Writer writer = this.getFactory().getAbdera().getWriter();
writeTo(writer, new OutputStreamWriter(out, charset));
}
public void writeTo(java.io.Writer writer) throws IOException {
Writer out = getFactory().getAbdera().getWriter();
if (!(out instanceof FOMWriter)) {
out.writeTo(this, writer);
} else {
try {
OMOutputFormat outputFormat = new OMOutputFormat();
if (getDocument() != null && getDocument().getCharset() != null)
outputFormat.setCharSetEncoding(getDocument().getCharset());