Package org.apache.ws.commons.serialize
Class CharSetXMLWriter
- java.lang.Object
-
- org.apache.ws.commons.serialize.XMLWriterImpl
-
- org.apache.ws.commons.serialize.CharSetXMLWriter
-
- All Implemented Interfaces:
XMLWriter,org.xml.sax.ContentHandler
public class CharSetXMLWriter extends XMLWriterImpl
An improved version ofXMLWriterImpl, using theCharsetfrom Java 1.4.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.CharsetEncodercharsetEncoder-
Fields inherited from class org.apache.ws.commons.serialize.XMLWriterImpl
curIndent
-
-
Constructor Summary
Constructors Constructor Description CharSetXMLWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEncode(char c)Returns whether the XMLWriter can encode the charactercwithout an escape sequence like &#ddd;.voidstartDocument()Starts a document.-
Methods inherited from class org.apache.ws.commons.serialize.XMLWriterImpl
characters, endDocument, endElement, endPrefixMapping, getDocumentLocator, getEncoding, getIndentString, getLineFeed, getWriter, ignorableWhitespace, isDeclarating, isFlushing, isIndenting, processingInstruction, setDeclarating, setDocumentLocator, setEncoding, setFlushing, setIndenting, setIndentString, setLineFeed, setWriter, skippedEntity, startElement, startPrefixMapping
-
-
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionDescription copied from class:XMLWriterImplStarts a document.
- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classXMLWriterImpl- Throws:
org.xml.sax.SAXException- Not actually thrown, just for compliance to the interface specification.
-
canEncode
public boolean canEncode(char c)
Description copied from interface:XMLWriterReturns whether the XMLWriter can encode the character
cwithout an escape sequence like &#ddd;.- Specified by:
canEncodein interfaceXMLWriter- Overrides:
canEncodein classXMLWriterImpl- Parameters:
c- The character being checked for escaping.- Returns:
- Whether to encode the character.
-
-