com.sun.xml.fastinfoset.dom
Class DOMDocumentParser

java.lang.Object
  extended bycom.sun.xml.fastinfoset.Decoder
      extended bycom.sun.xml.fastinfoset.dom.DOMDocumentParser
All Implemented Interfaces:
FastInfosetParser

public class DOMDocumentParser
extends Decoder

The Fast Infoset DOM parser.

Instantiate this parser to parse a fast infoset document in accordance with the DOM API.


Nested Class Summary
 
Nested classes inherited from class com.sun.xml.fastinfoset.Decoder
Decoder.EncodingAlgorithmInputStream
 
Field Summary
protected  org.w3c.dom.Element _currentElement
           
protected  org.w3c.dom.Node _currentNode
           
protected  org.w3c.dom.Document _document
           
protected  org.w3c.dom.Attr[] _namespaceAttributes
           
protected  int _namespaceAttributesIndex
           
protected  int[] _namespacePrefixes
           
protected  int _namespacePrefixesIndex
           
 
Fields inherited from class com.sun.xml.fastinfoset.Decoder
_addToTable, _attributeNameTable, _attributeValueTable, _b, _bufferSize, _characterContentChunkTable, _charBuffer, _charBufferLength, _doubleTerminate, _duplicateAttributeVerifier, _elementNameTable, _identifier, _integer, _namespaceNameIndex, _notations, _octetBuffer, _octetBufferEnd, _octetBufferLength, _octetBufferOffset, _octetBufferStart, _parseFragments, _prefixIndex, _prefixTable, _registeredEncodingAlgorithms, _terminate, _unparsedEntities, _v, BUFFER_SIZE_SYSTEM_PROPERTY, NISTRING_EMPTY_STRING, NISTRING_ENCODING_ALGORITHM, NISTRING_INDEX, NISTRING_STRING, STRING_INTERNING_SYSTEM_PROPERTY, XML_NAMESPACE_NAME_CHARS, XMLNS_NAMESPACE_NAME_CHARS, XMLNS_NAMESPACE_PREFIX_CHARS
 
Fields inherited from interface org.jvnet.fastinfoset.FastInfosetParser
BUFFER_SIZE_PROPERTY, EXTERNAL_VOCABULARIES_PROPERTY, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, STRING_INTERNING_PROPERTY
 
Constructor Summary
DOMDocumentParser()
           
 
Method Summary
protected  java.lang.String convertEncodingAlgorithmDataToCharacters(boolean isAttributeValue)
           
protected  org.w3c.dom.Attr createAttribute(java.lang.String namespaceName, java.lang.String qName, java.lang.String localName)
           
protected  org.w3c.dom.Element createElement(java.lang.String namespaceName, java.lang.String qName, java.lang.String localName)
           
protected  void parse()
           
 void parse(org.w3c.dom.Document d, java.io.InputStream s)
          Parse a fast infoset document into a Document instance.
protected  void parse(java.io.InputStream s)
           
protected  void processAIIs()
           
protected  void processCommentII()
           
protected  void processDII()
           
protected  void processDIIOptionalProperties()
           
protected  void processEII(QualifiedName name, boolean hasAttributes)
           
protected  void processEIIWithNamespaces()
           
protected  QualifiedName processLiteralQualifiedName(int state)
           
protected  QualifiedName processLiteralQualifiedName(int state, QualifiedName q)
           
protected  void processProcessingII()
           
protected  void resetOnError()
           
 
Methods inherited from class com.sun.xml.fastinfoset.Decoder
_isFastInfosetDocument, createQualifiedNameString, decodeAdditionalData, decodeAlphabetOctetsAsCharBuffer, decodeCharacterEncodingScheme, decodeDII, decodeEIIIndexLarge, decodeEIIIndexMedium, decodeFourBitAlphabetOctetsAsCharBuffer, decodeHeader, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix, decodeIdentifyingNonEmptyStringOnFirstBit, decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix, decodeInitialVocabulary, decodeIntegerIndexOnSecondBit, decodeLiteralQualifiedName, decodeNonEmptyOctetStringLengthOnSecondBit, decodeNonEmptyOctetStringOnSecondBitAsUtf8CharArray, decodeNonEmptyOctetStringOnSecondBitAsUtf8String, decodeNonIdentifyingStringOnFirstBit, decodeNotations, decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit, decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit, decodeRAOctetsAsString, decodeRestrictedAlphabetAsCharBuffer, decodeRestrictedAlphabetAsString, decodeUnparsedEntities, decodeUtf16StringAsCharBuffer, decodeUtf16StringAsString, decodeUtf8NCNameIntoCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsString, decodeUtf8StringIntoCharBuffer, decodeUtf8StringIntoCharBuffer, decodeVersion, getBufferSize, getExternalVocabularies, getParseFragments, getRegisteredEncodingAlgorithms, getStringInterning, isFastInfosetDocument, peek, peek, peek2, read, reset, setBufferSize, setExternalVocabularies, setInputStream, setParseFragments, setRegisteredEncodingAlgorithms, setStringInterning, setVocabulary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_document

protected org.w3c.dom.Document _document

_currentNode

protected org.w3c.dom.Node _currentNode

_currentElement

protected org.w3c.dom.Element _currentElement

_namespaceAttributes

protected org.w3c.dom.Attr[] _namespaceAttributes

_namespaceAttributesIndex

protected int _namespaceAttributesIndex

_namespacePrefixes

protected int[] _namespacePrefixes

_namespacePrefixesIndex

protected int _namespacePrefixesIndex
Constructor Detail

DOMDocumentParser

public DOMDocumentParser()
Method Detail

parse

public void parse(org.w3c.dom.Document d,
                  java.io.InputStream s)
           throws FastInfosetException,
                  java.io.IOException
Parse a fast infoset document into a Document instance.

Nodes will be created and appended to the Document instance.

Parameters:
d - the Document instance.
s - the input stream containing the fast infoset document.
Throws:
FastInfosetException
java.io.IOException

parse

protected final void parse(java.io.InputStream s)
                    throws FastInfosetException,
                           java.io.IOException
Throws:
FastInfosetException
java.io.IOException

resetOnError

protected void resetOnError()

parse

protected final void parse()
                    throws FastInfosetException,
                           java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processDII

protected final void processDII()
                         throws FastInfosetException,
                                java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processDIIOptionalProperties

protected final void processDIIOptionalProperties()
                                           throws FastInfosetException,
                                                  java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processEII

protected final void processEII(QualifiedName name,
                                boolean hasAttributes)
                         throws FastInfosetException,
                                java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processEIIWithNamespaces

protected final void processEIIWithNamespaces()
                                       throws FastInfosetException,
                                              java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processLiteralQualifiedName

protected final QualifiedName processLiteralQualifiedName(int state,
                                                          QualifiedName q)
                                                   throws FastInfosetException,
                                                          java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processLiteralQualifiedName

protected final QualifiedName processLiteralQualifiedName(int state)
                                                   throws FastInfosetException,
                                                          java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processAIIs

protected final void processAIIs()
                          throws FastInfosetException,
                                 java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processCommentII

protected final void processCommentII()
                               throws FastInfosetException,
                                      java.io.IOException
Throws:
FastInfosetException
java.io.IOException

processProcessingII

protected final void processProcessingII()
                                  throws FastInfosetException,
                                         java.io.IOException
Throws:
FastInfosetException
java.io.IOException

createElement

protected org.w3c.dom.Element createElement(java.lang.String namespaceName,
                                            java.lang.String qName,
                                            java.lang.String localName)

createAttribute

protected org.w3c.dom.Attr createAttribute(java.lang.String namespaceName,
                                           java.lang.String qName,
                                           java.lang.String localName)

convertEncodingAlgorithmDataToCharacters

protected java.lang.String convertEncodingAlgorithmDataToCharacters(boolean isAttributeValue)
                                                             throws FastInfosetException,
                                                                    java.io.IOException
Throws:
FastInfosetException
java.io.IOException