Package com.sun.xml.fastinfoset.dom
Class DOMDocumentSerializer
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.sun.xml.fastinfoset.Encoder
-
- com.sun.xml.fastinfoset.dom.DOMDocumentSerializer
-
- All Implemented Interfaces:
FastInfosetSerializer,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class DOMDocumentSerializer extends Encoder
The Fast Infoset DOM serializer.Instantiate this serializer to serialize a fast infoset document in accordance with the DOM API.
-
-
Field Summary
Fields Modifier and Type Field Description protected Node[]_attributesprotected NamespaceContextImplementation_namespaceScopeContext-
Fields inherited from class com.sun.xml.fastinfoset.Encoder
_b, _characterEncodingSchemeSystemDefault, _charBuffer, _markIndex, _octetBuffer, _octetBufferIndex, _s, _terminate, _v, _vData, attributeValueMapTotalCharactersConstraint, CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY, characterContentChunkMapTotalCharactersConstraint, maxAttributeValueSize, maxCharacterContentChunkSize, minAttributeValueSize, minCharacterContentChunkSize
-
Fields inherited from interface org.jvnet.fastinfoset.FastInfosetSerializer
ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT, BUFFER_SIZE_PROPERTY, CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT, EXTERNAL_VOCABULARIES_PROPERTY, IGNORE_COMMENTS_FEATURE, IGNORE_DTD_FEATURE, IGNORE_PROCESSING_INSTRUCTIONS_FEATURE, IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE, MAX_ATTRIBUTE_VALUE_SIZE, MAX_CHARACTER_CONTENT_CHUNK_SIZE, MIN_ATTRIBUTE_VALUE_SIZE, MIN_CHARACTER_CONTENT_CHUNK_SIZE, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, UTF_16BE, UTF_8
-
-
Constructor Summary
Constructors Constructor Description DOMDocumentSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidencodeAttribute(String namespaceURI, String qName, String localName)protected voidencodeElement(String namespaceURI, String qName, String localName)voidserialize(Document d)Serialize aDocument.voidserialize(Node n)Serialize aNode.protected voidserializeCDATA(Node t)protected voidserializeComment(Node c)protected voidserializeElement(Node e)protected voidserializeElementAsDocument(Node e)protected voidserializeProcessingInstruction(Node pi)protected voidserializeText(Node t)-
Methods inherited from class com.sun.xml.fastinfoset.Encoder
canAddAttributeToTable, canAddCharacterContentToTable, encodeAIIBuiltInAlgorithmData, encodeAIIObjectAlgorithmData, encodeAIIOctetAlgorithmData, encodeAlphabetCharacters, encodeAttributeQualifiedNameOnSecondBit, encodeCharacters, encodeCharactersNoClone, encodeCIIBuiltInAlgorithmData, encodeCIIBuiltInAlgorithmDataAsCDATA, encodeCIIObjectAlgorithmData, encodeCIIOctetAlgorithmData, encodeComment, encodeCommentNoClone, encodeDateTimeFourBitCharacters, encodeDateTimeNonIdentifyingStringOnFirstBit, encodeDocumentTermination, encodeDocumentTypeDeclaration, encodeElementQualifiedNameOnThirdBit, encodeElementTermination, encodeFourBitCharacters, encodeHeader, encodeIdentifyingNonEmptyStringOnFirstBit, encodeInitialVocabulary, encodeLiteralAttributeQualifiedNameOnSecondBit, encodeLiteralElementQualifiedNameOnThirdBit, encodeNamespaceAttribute, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnSeventhBit, encodeNonEmptyFourBitCharacterString, encodeNonEmptyFourBitCharacterStringOnSeventhBit, encodeNonEmptyNBitCharacterStringOnSeventhBit, encodeNonEmptyOctetStringOnSecondBit, encodeNonEmptyUTF8StringAsOctetString, encodeNonEmptyUTF8StringAsOctetString, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonZeroInteger, encodeNonZeroIntegerOnFourthBit, encodeNonZeroIntegerOnSecondBitFirstBitOne, encodeNonZeroIntegerOnSecondBitFirstBitZero, encodeNonZeroIntegerOnThirdBit, encodeNonZeroOctetStringLength, encodeNonZeroOctetStringLengthOnFifthBit, encodeNonZeroOctetStringLengthOnSecondBit, encodeNonZeroOctetStringLengthOnSenventhBit, encodeNumericFourBitCharacters, encodeNumericNonIdentifyingStringOnFirstBit, encodeProcessingInstruction, encodeTermination, encodeUtf16String, encodeUtf16String, encodeUTF8String, encodeUTF8String, getAttributeValueMapMemoryLimit, getCharacterContentChunkMapMemoryLimit, getCharacterEncodingScheme, getIgnoreComments, getIgnoreDTD, getIgnoreProcesingInstructions, getIgnoreWhiteSpaceTextContent, getMaxAttributeValueSize, getMaxCharacterContentChunkSize, getMinAttributeValueSize, getMinCharacterContentChunkSize, getPrefixFromQualifiedName, getRegisteredEncodingAlgorithms, getVocabularyApplicationData, hasMark, isAttributeValueLengthMatchesLimit, isCharacterContentChunkLengthMatchesLimit, isWhiteSpace, isWhiteSpace, mark, reset, resetMark, setAttributeValueMapMemoryLimit, setCharacterContentChunkMapMemoryLimit, setCharacterEncodingScheme, setExternalVocabulary, setIgnoreComments, setIgnoreDTD, setIgnoreProcesingInstructions, setIgnoreWhiteSpaceTextContent, setMaxAttributeValueSize, setMaxCharacterContentChunkSize, setMinAttributeValueSize, setMinCharacterContentChunkSize, setOutputStream, setRegisteredEncodingAlgorithms, setVocabulary, setVocabularyApplicationData, write, write, write
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
_namespaceScopeContext
protected NamespaceContextImplementation _namespaceScopeContext
-
_attributes
protected Node[] _attributes
-
-
Method Detail
-
serialize
public final void serialize(Node n) throws IOException
Serialize aNode.- Parameters:
n- the node to serialize.- Throws:
IOException
-
serialize
public final void serialize(Document d) throws IOException
Serialize aDocument.- Parameters:
d- the document to serialize.- Throws:
IOException
-
serializeElementAsDocument
protected final void serializeElementAsDocument(Node e) throws IOException
- Throws:
IOException
-
serializeElement
protected final void serializeElement(Node e) throws IOException
- Throws:
IOException
-
serializeText
protected final void serializeText(Node t) throws IOException
- Throws:
IOException
-
serializeCDATA
protected final void serializeCDATA(Node t) throws IOException
- Throws:
IOException
-
serializeComment
protected final void serializeComment(Node c) throws IOException
- Throws:
IOException
-
serializeProcessingInstruction
protected final void serializeProcessingInstruction(Node pi) throws IOException
- Throws:
IOException
-
encodeElement
protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException
- Throws:
IOException
-
encodeAttribute
protected final void encodeAttribute(String namespaceURI, String qName, String localName) throws IOException
- Throws:
IOException
-
-