Class Decoder

java.lang.Object
com.sun.xml.fastinfoset.Decoder
All Implemented Interfaces:
FastInfosetParser
Direct Known Subclasses:
StAXDocumentParser

public abstract class Decoder extends Object implements FastInfosetParser
Abstract decoder for developing concrete encoders. Concrete implementations extending Decoder will utilize methods on Decoder to decode XML infoset according to the Fast Infoset standard. It is the responsibility of the concrete implementation to ensure that methods are invoked in the correct order to correctly decode a valid fast infoset document.

This class extends org.sax.xml.DefaultHandler so that concrete SAX implementations can be used with javax.xml.parsers.SAXParser and the parse methods that take org.sax.xml.DefaultHandler as a parameter.

Buffering of octets that are read from an InputStream is supported in a similar manner to a BufferedInputStream. Combining buffering with decoding enables better performance.

More than one fast infoset document may be decoded from the InputStream.

  • Field Details

    • STRING_INTERNING_SYSTEM_PROPERTY

      public static final String STRING_INTERNING_SYSTEM_PROPERTY
      String interning system property.
      See Also:
    • BUFFER_SIZE_SYSTEM_PROPERTY

      public static final String BUFFER_SIZE_SYSTEM_PROPERTY
      Internal buffer size interning system property.
      See Also:
    • _parseFragments

      protected boolean _parseFragments
      True if can parse fragments.
    • _needForceStreamClose

      protected boolean _needForceStreamClose
      True if needs to close underlying input stream.
    • _notations

      protected List _notations
      The list of Notation Information Items that are part of the Document Information Item.
    • _unparsedEntities

      protected List _unparsedEntities
      The list of Unparsed Entity Information Items that are part of the Document Information Item.
    • _registeredEncodingAlgorithms

      protected Map _registeredEncodingAlgorithms
      The map of URIs to registered encoding algorithms.
    • _v

      protected ParserVocabulary _v
      The vocabulary used for decoding.
    • _prefixTable

      protected com.sun.xml.fastinfoset.util.PrefixArray _prefixTable
      The prefix table of the vocabulary.
    • _elementNameTable

      protected com.sun.xml.fastinfoset.util.QualifiedNameArray _elementNameTable
      The element name table of the vocabulary.
    • _attributeNameTable

      protected com.sun.xml.fastinfoset.util.QualifiedNameArray _attributeNameTable
      The attribute name table of the vocabulary.
    • _characterContentChunkTable

      protected com.sun.xml.fastinfoset.util.ContiguousCharArrayArray _characterContentChunkTable
      The character content chunk table of the vocabulary.
    • _attributeValueTable

      protected com.sun.xml.fastinfoset.util.StringArray _attributeValueTable
      The attribute value table of the vocabulary.
    • _b

      protected int _b
      The current octet that is being read
    • _terminate

      protected boolean _terminate
      True if an information item is terminated.
    • _doubleTerminate

      protected boolean _doubleTerminate
      True if two information item are terminated in direct sequence.
    • _addToTable

      protected boolean _addToTable
      True if an entry is required to be added to a table
    • _integer

      protected int _integer
      The vocabulary table index to an indexed non identifying string.
    • _identifier

      protected int _identifier
      The vocabulary table index of identifying string or the identifier of an encoding algorithm or restricted alphabet.
    • _bufferSize

      protected int _bufferSize
      The size of the internal buffer.
    • _octetBuffer

      protected byte[] _octetBuffer
      The internal buffer used for decoding.
    • _octetBufferStart

      protected int _octetBufferStart
      A mark into the internal buffer used for decoding encoded algorithm or restricted alphabet data.
    • _octetBufferOffset

      protected int _octetBufferOffset
      The offset into the buffer to read the next byte.
    • _octetBufferEnd

      protected int _octetBufferEnd
      The end of the buffer.
    • _octetBufferLength

      protected int _octetBufferLength
      The length of some octets in the buffer that are to be read.
    • _charBuffer

      protected char[] _charBuffer
      The internal buffer of characters.
    • _charBufferLength

      protected int _charBufferLength
      The length of characters in the buffer of characters.
    • _duplicateAttributeVerifier

      protected com.sun.xml.fastinfoset.util.DuplicateAttributeVerifier _duplicateAttributeVerifier
      Helper class that checks for duplicate attribute information items.
    • NISTRING_STRING

      protected static final int NISTRING_STRING
      See Also:
    • NISTRING_INDEX

      protected static final int NISTRING_INDEX
      See Also:
    • NISTRING_ENCODING_ALGORITHM

      protected static final int NISTRING_ENCODING_ALGORITHM
      See Also:
    • NISTRING_EMPTY_STRING

      protected static final int NISTRING_EMPTY_STRING
      See Also:
    • _prefixIndex

      protected int _prefixIndex
    • _namespaceNameIndex

      protected int _namespaceNameIndex
  • Constructor Details

    • Decoder

      protected Decoder()
      Default constructor for the Decoder.
  • Method Details