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
,ContentHandler
An improved version of
XMLWriterImpl
,
using theCharset
from Java 1.4.-
Field Summary
FieldsFields inherited from class org.apache.ws.commons.serialize.XMLWriterImpl
curIndent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canEncode
(char c) Returns whether the XMLWriter can encode the characterc
without an escape sequence like &#ddd;.void
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
charsetEncoder
-
-
Constructor Details
-
CharSetXMLWriter
public CharSetXMLWriter()
-
-
Method Details
-
startDocument
Description copied from class:XMLWriterImpl
Starts a document.
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classXMLWriterImpl
- Throws:
SAXException
- Not actually thrown, just for compliance to the interface specification.
-
canEncode
public boolean canEncode(char c) Description copied from interface:XMLWriter
Returns whether the XMLWriter can encode the character
c
without an escape sequence like &#ddd;.- Specified by:
canEncode
in interfaceXMLWriter
- Overrides:
canEncode
in classXMLWriterImpl
- Parameters:
c
- The character being checked for escaping.- Returns:
- Whether to encode the character.
-