public class CharSetXMLWriter extends XMLWriterImpl {
private CharsetEncoder charsetEncoder;
public void startDocument() throws SAXException {
Charset charSet = Charset.forName(getEncoding());
if (charSet.canEncode()) {
charsetEncoder = charSet.newEncoder();
}
}
public boolean canEncode(char c) {