com.fasterxml.aalto.in

## Class XmlScanner

- java.lang.Object
- - com.fasterxml.aalto.in.XmlScanner

- All Implemented Interfaces:
    XmlConsts, NamespaceContext, XMLStreamConstants
  Direct Known Subclasses:
    ByteBasedScanner, ReaderScanner

      public abstract class XmlScanner
      extends Object
      implements XmlConsts, XMLStreamConstants, NamespaceContext

  This is the abstract base class for all scanner implementations, defining operations the actual parser requires from the low-level scanners. Scanners are encoding and input type (byte, char / stream, block) specific, so there are many implementations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AttributeCollector` | `_attrCollector`
    `protected int` | `_attrCount`
    `protected boolean` | `_cfgCoalescing`
    `protected boolean` | `_cfgLazyParsing`
    `protected ReaderConfig` | `_config`
    `protected ElementScope` | `_currElem` Information about the current element on the stack
    `protected int` | `_currNsCount` This is a temporary state variable, valid during START_ELEMENT event.
    `protected int` | `_currRow` The row on which the character to read next is on.
    `protected int` | `_currToken`
    `protected com.fasterxml.aalto.in.NsBinding` | `_defaultNs` Default namespace binding is a per-document singleton, like explicit bindings, and used for elements (never for attributes).
    `protected int` | `_depth` Number of START_ELEMENT events returned for which no END_ELEMENT has been returned; including current event.
    `protected boolean` | `_entityPending` Flag set to indicate that an entity is pending
    `protected boolean` | `_isEmptyTag` Flag that is used if the current state is `START_ELEMENT` or `END_ELEMENT`, to indicate if the underlying physical tag is a so-called empty tag (one ending with "/>")
    `protected FixedNsContext` | `_lastNsContext` Last returned `NamespaceContext`, created for a call to `getNonTransientNamespaceContext()`, iff this would still be a valid context.
    `protected NsDeclaration` | `_lastNsDecl` Pointer to the last namespace declaration encountered.
    `protected char[]` | `_nameBuffer` Similarly, need a char buffer for actual String construction (in future, could perhaps use StringBuilder?).
    `protected PName[]` | `_nsBindingCache` Although unbound pname instances can be easily and safely reused, bound ones are per-document.
    `protected int` | `_nsBindingCount`
    `protected com.fasterxml.aalto.in.NsBinding[]` | `_nsBindings` Array containing all prefix bindings needed within the current document, so far (if any).
    `protected int` | `_nsBindMisses`
    `protected long` | `_pastBytesOrChars` Number of bytes that were read and processed before the contents of the current buffer; used for calculating absolute offsets.
    `protected String` | `_publicId` Public id of the current event (DTD), if any.
    `protected int` | `_rowStartOffset` Offset used to calculate the column value given current input buffer pointer.
    `protected long` | `_startColumn` Current column at start of current (last returned) token
    `protected long` | `_startRawOffset` Offset (in chars or bytes) at start of current token
    `protected long` | `_startRow` Current row at start of current (last returned) token
    `protected String` | `_systemId` System id of the current event (DTD), if any.
    `protected TextBuilder` | `_textBuilder` Textual content of the current event
    `protected boolean` | `_tokenIncomplete`
    `protected PName` | `_tokenName` Current name associated with the token, if any.
    `protected boolean` | `_xml11` Whether validity checks (wrt.
    `protected String` | `CDATA_STR` String that identifies CDATA section (after "
    `protected static int` | `INT_0`
    `protected static int` | `INT_9`
    `protected static int` | `INT_a`
    `protected static int` | `INT_A`
    `protected static int` | `INT_AMP`
    `protected static int` | `INT_APOS`
    `protected static int` | `INT_COLON`
    `protected static int` | `INT_CR`
    `protected static int` | `INT_EQ`
    `protected static int` | `INT_EXCL`
    `protected static int` | `INT_f`
    `protected static int` | `INT_F`
    `protected static int` | `INT_GT`
    `protected static int` | `INT_HYPHEN`
    `protected static int` | `INT_LBRACKET`
    `protected static int` | `INT_LF`
    `protected static int` | `INT_LT`
    `protected static int` | `INT_NULL`
    `protected static int` | `INT_QMARK`
    `protected static int` | `INT_QUOTE`
    `protected static int` | `INT_RBRACKET`
    `protected static int` | `INT_SLASH`
    `protected static int` | `INT_SPACE`
    `protected static int` | `INT_TAB`
    `protected static int` | `INT_z`
    `protected static int` | `MAX_UNICODE_CHAR` This constant defines the highest Unicode character allowed in XML content.
    `static int` | `TOKEN_EOI` This token type signifies end-of-input, in cases where it can be returned.

    - ### Fields inherited from interface com.fasterxml.aalto.util.XmlConsts

      `CHAR_CR, CHAR_LF, CHAR_NULL, CHAR_SPACE, STAX_DEFAULT_OUTPUT_ENCODING, STAX_DEFAULT_OUTPUT_VERSION, XML_DECL_KW_ENCODING, XML_DECL_KW_STANDALONE, XML_DECL_KW_VERSION, XML_SA_NO, XML_SA_YES, XML_V_10, XML_V_10_STR, XML_V_11, XML_V_11_STR, XML_V_UNKNOWN`

    - ### Fields inherited from interface javax.xml.stream.XMLStreamConstants

      `ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `XmlScanner(ReaderConfig cfg)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `_closeSource()`
    `protected void` | `_releaseBuffers()`
    `protected PName` | `bindName(PName name, String prefix)` This method is called to find/create a fully qualified (bound) name (element / attribute), for a name with prefix.
    `protected void` | `bindNs(PName name, String uri)` Method called when we are ready to bind a declared namespace.
    `protected void` | `checkImmutableBinding(String prefix, String uri)` Method called when an immutable ns prefix (xml, xmlns) is encountered.
    `void` | `close(boolean forceCloseSource)` Method called at point when the parsing process has ended (either by encountering end of the input, or via explicit close), and buffers can and should be released.
    `byte[]` | `decodeAttrBinaryValue(int index, org.codehaus.stax2.typed.Base64Variant v, org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec)`
    `void` | `decodeAttrValue(int index, org.codehaus.stax2.typed.TypedValueDecoder tvd)`
    `int` | `decodeAttrValues(int index, org.codehaus.stax2.typed.TypedArrayDecoder tad)` Method called to decode the attribute value that consists of zero or more space-separated tokens.
    `int` | `decodeElements(org.codehaus.stax2.typed.TypedArrayDecoder tad, boolean reset)` Method called by the stream reader to decode space-separated tokens that are part of the current text event, using given decoder.
    `int` | `findAttrIndex(String nsURI, String localName)`
    `protected com.fasterxml.aalto.in.NsBinding` | `findOrCreateBinding(String prefix)` Method called when a namespace declaration needs to find the binding object (essentially a per-prefix-per-document canonical container object)
    `protected abstract void` | `finishCData()`
    `protected abstract void` | `finishCharacters()`
    `protected abstract void` | `finishComment()`
    `protected abstract void` | `finishDTD(boolean copyContents)`
    `protected abstract void` | `finishPI()`
    `protected abstract void` | `finishSpace()`
    `protected abstract void` | `finishToken()` This method is called to ensure that the current token/event has been completely parsed, such that we have all the data needed to return it (textual content, PI data, comment text etc)
    `void` | `fireSaxCharacterEvents(ContentHandler h)`
    `void` | `fireSaxCommentEvent(LexicalHandler h)`
    `void` | `fireSaxEndElement(ContentHandler h)`
    `void` | `fireSaxPIEvent(ContentHandler h)`
    `void` | `fireSaxSpaceEvents(ContentHandler h)`
    `void` | `fireSaxStartElement(ContentHandler h, Attributes attrs)`
    `AttributeCollector` | `getAttrCollector()`
    `int` | `getAttrCount()`
    `String` | `getAttrLocalName(int index)`
    `String` | `getAttrNsURI(int index)`
    `String` | `getAttrPrefix(int index)`
    `String` | `getAttrPrefixedName(int index)`
    `QName` | `getAttrQName(int index)`
    `String` | `getAttrType(int index)`
    `String` | `getAttrValue(int index)`
    `String` | `getAttrValue(String nsURI, String localName)`
    `ReaderConfig` | `getConfig()`
    `abstract int` | `getCurrentColumnNr()`
    `int` | `getCurrentLineNr()`
    `abstract org.codehaus.stax2.XMLStreamLocation2` | `getCurrentLocation()`
    `int` | `getDepth()`
    `String` | `getDTDPublicId()`
    `String` | `getDTDSystemId()`
    `abstract long` | `getEndingByteOffset()`
    `abstract long` | `getEndingCharOffset()`
    `org.codehaus.stax2.XMLStreamLocation2` | `getEndLocation()`
    `String` | `getInputPublicId()`
    `String` | `getInputSystemId()`
    `PName` | `getName()`
    `String` | `getNamespacePrefix(int index)`
    `String` | `getNamespaceURI()`
    `String` | `getNamespaceURI(int index)`
    `String` | `getNamespaceURI(String prefix)`
    `NamespaceContext` | `getNonTransientNamespaceContext()`
    `int` | `getNsCount()`
    `String` | `getPrefix(String nsURI)`
    `Iterator<String>` | `getPrefixes(String nsURI)`
    `QName` | `getQName()`
    `abstract long` | `getStartingByteOffset()`
    `abstract long` | `getStartingCharOffset()`
    `org.codehaus.stax2.XMLStreamLocation2` | `getStartLocation()`
    `String` | `getText()`
    `int` | `getText(Writer w, boolean preserveContents)`
    `char[]` | `getTextCharacters()`
    `int` | `getTextCharacters(int srcStart, char[] target, int targetStart, int len)`
    `int` | `getTextLength()`
    `protected char` | `handleInvalidXmlChar(int i)`
    `boolean` | `hasEmptyStack()`
    `boolean` | `isAttrSpecified(int index)`
    `boolean` | `isEmptyTag()`
    `boolean` | `isTextWhitespace()`
    `protected abstract boolean` | `loadMore()`
    `protected void` | `loadMoreGuaranteed()` Method that tries to load at least one more byte into buffer; and if that fails, throws an appropriate EOI exception.
    `protected void` | `loadMoreGuaranteed(int tt)`
    `abstract int` | `nextFromProlog(boolean isProlog)`
    `abstract int` | `nextFromTree()`
    `protected void` | `reportDoubleHyphenInComments()`
    `protected void` | `reportDuplicateNsDecl(String prefix)`
    `protected void` | `reportEntityOverflow()`
    `protected void` | `reportEofInName(char[] cbuf, int clen)`
    `protected void` | `reportIllegalCDataEnd()`
    `protected void` | `reportIllegalNsDecl(String prefix)`
    `protected void` | `reportIllegalNsDecl(String prefix, String uri)`
    `protected void` | `reportInputProblem(String msg)`
    `protected void` | `reportInvalidNameChar(int ch, int index)`
    `protected void` | `reportInvalidNsIndex(int index)`
    `protected void` | `reportInvalidXmlChar(int ch)`
    `protected void` | `reportMissingPISpace(int ch)` Called when there's an unexpected char after PI target (non-ws, not part of '?>' end marker
    `protected void` | `reportMultipleColonsInName()`
    `protected void` | `reportPrologProblem(boolean isProlog, String msg)`
    `protected void` | `reportPrologUnexpChar(boolean isProlog, int ch, String msg)`
    `protected void` | `reportPrologUnexpElement(boolean isProlog, int ch)`
    `protected void` | `reportTreeUnexpChar(int ch, String msg)`
    `protected void` | `reportUnboundPrefix(PName name, boolean isAttr)`
    `protected void` | `reportUnexpandedEntityInAttr(PName name, boolean isNsDecl)` Method called when a call to expand an entity within attribute value fails to expand it.
    `protected void` | `reportUnexpectedEndTag(String expName)`
    `void` | `resetForDecoding(org.codehaus.stax2.typed.Base64Variant v, org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec, boolean firstChunk)` Method called by the stream reader to reset given base64 decoder with data from the current text event.
    `protected abstract void` | `skipCData()`
    `protected abstract boolean` | `skipCharacters()`
    `protected abstract boolean` | `skipCoalescedText()` Secondary skip method called after primary text segment has been skipped, and we are in coalescing mode.
    `protected abstract void` | `skipComment()`
    `protected abstract void` | `skipPI()`
    `protected abstract void` | `skipSpace()`
    `protected boolean` | `skipToken()` This method is called to essentially skip remaining of the current token (data of PI etc)
    `protected void` | `throwInvalidSpace(int i)`
    `protected void` | `throwNullChar()`
    `protected void` | `throwUnexpectedChar(int i, String msg)`
    `protected void` | `verifyXmlChar(int value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CDATA_STR

          protected final String CDATA_STR

      String that identifies CDATA section (after "
      See Also:
        Constant Field Values

    - #### TOKEN_EOI

          public static final int TOKEN_EOI

      This token type signifies end-of-input, in cases where it can be returned. In other cases, an exception may be thrown.
      See Also:
        Constant Field Values

    - #### MAX_UNICODE_CHAR

          protected static final int MAX_UNICODE_CHAR

      This constant defines the highest Unicode character allowed in XML content.
      See Also:
        Constant Field Values

    - #### INT_NULL

          protected static final int INT_NULL

      See Also:
        Constant Field Values

    - #### INT_CR

          protected static final int INT_CR

      See Also:
        Constant Field Values

    - #### INT_LF

          protected static final int INT_LF

      See Also:
        Constant Field Values

    - #### INT_TAB

          protected static final int INT_TAB

      See Also:
        Constant Field Values

    - #### INT_SPACE

          protected static final int INT_SPACE

      See Also:
        Constant Field Values

    - #### INT_HYPHEN

          protected static final int INT_HYPHEN

      See Also:
        Constant Field Values

    - #### INT_QMARK

          protected static final int INT_QMARK

      See Also:
        Constant Field Values

    - #### INT_AMP

          protected static final int INT_AMP

      See Also:
        Constant Field Values

    - #### INT_LT

          protected static final int INT_LT

      See Also:
        Constant Field Values

    - #### INT_GT

          protected static final int INT_GT

      See Also:
        Constant Field Values

    - #### INT_QUOTE

          protected static final int INT_QUOTE

      See Also:
        Constant Field Values

    - #### INT_APOS

          protected static final int INT_APOS

      See Also:
        Constant Field Values

    - #### INT_EXCL

          protected static final int INT_EXCL

      See Also:
        Constant Field Values

    - #### INT_COLON

          protected static final int INT_COLON

      See Also:
        Constant Field Values

    - #### INT_LBRACKET

          protected static final int INT_LBRACKET

      See Also:
        Constant Field Values

    - #### INT_RBRACKET

          protected static final int INT_RBRACKET

      See Also:
        Constant Field Values

    - #### INT_SLASH

          protected static final int INT_SLASH

      See Also:
        Constant Field Values

    - #### INT_EQ

          protected static final int INT_EQ

      See Also:
        Constant Field Values

    - #### INT_A

          protected static final int INT_A

      See Also:
        Constant Field Values

    - #### INT_F

          protected static final int INT_F

      See Also:
        Constant Field Values

    - #### INT_a

          protected static final int INT_a

      See Also:
        Constant Field Values

    - #### INT_f

          protected static final int INT_f

      See Also:
        Constant Field Values

    - #### INT_z

          protected static final int INT_z

      See Also:
        Constant Field Values

    - #### INT_0

          protected static final int INT_0

      See Also:
        Constant Field Values

    - #### INT_9

          protected static final int INT_9

      See Also:
        Constant Field Values

    - #### _config

          protected final ReaderConfig _config

    - #### _xml11

          protected final boolean _xml11

      Whether validity checks (wrt. name and text characters) and normalization (linefeeds) is to be done using xml 1.1 rules, or basic xml 1.0 rules. Default is 1.0.

    - #### _cfgCoalescing

          protected final boolean _cfgCoalescing

    - #### _cfgLazyParsing

          protected boolean _cfgLazyParsing

    - #### _currToken

          protected int _currToken

    - #### _tokenIncomplete

          protected boolean _tokenIncomplete

    - #### _depth

          protected int _depth

      Number of START_ELEMENT events returned for which no END_ELEMENT has been returned; including current event.

    - #### _textBuilder

          protected final TextBuilder _textBuilder

      Textual content of the current event

    - #### _entityPending

          protected boolean _entityPending

      Flag set to indicate that an entity is pending

    - #### _nameBuffer

          protected char[] _nameBuffer

      Similarly, need a char buffer for actual String construction (in future, could perhaps use StringBuilder?). It is used for holding things like names (element, attribute), and attribute values.

    - #### _tokenName

          protected PName _tokenName

      Current name associated with the token, if any. Name of the current element, target of processing instruction, or name of an unexpanded entity.

    - #### _isEmptyTag

          protected boolean _isEmptyTag

      Flag that is used if the current state is `START_ELEMENT` or `END_ELEMENT`, to indicate if the underlying physical tag is a so-called empty tag (one ending with "/>")

    - #### _currElem

          protected ElementScope _currElem

      Information about the current element on the stack

    - #### _publicId

          protected String _publicId

      Public id of the current event (DTD), if any.

    - #### _systemId

          protected String _systemId

      System id of the current event (DTD), if any.

    - #### _lastNsDecl

          protected NsDeclaration _lastNsDecl

      Pointer to the last namespace declaration encountered. Because of backwards linking, it also serves as the head of the linked list of all active namespace declarations starting from the most recent one.

    - #### _currNsCount

          protected int _currNsCount

      This is a temporary state variable, valid during START_ELEMENT event. For those events, contains number of namespace declarations available. For END_ELEMENT, this count is computed on the fly.

    - #### _defaultNs

          protected com.fasterxml.aalto.in.NsBinding _defaultNs

      Default namespace binding is a per-document singleton, like explicit bindings, and used for elements (never for attributes).

    - #### _nsBindings

          protected com.fasterxml.aalto.in.NsBinding[] _nsBindings

      Array containing all prefix bindings needed within the current document, so far (if any). These bindings are not in a particular order, and they specifically do NOT represent actual namespace declarations parsed from xml content.

    - #### _nsBindingCount

          protected int _nsBindingCount

    - #### _nsBindingCache

          protected PName[] _nsBindingCache

      Although unbound pname instances can be easily and safely reused, bound ones are per-document. However, it makes sense to try to reuse them too; at least using a minimal static cache, activate only after certain number of cache misses (to avoid overhead for tiny documents, or documents with few or no namespace prefixes).

    - #### _nsBindMisses

          protected int _nsBindMisses

    - #### _lastNsContext

          protected FixedNsContext _lastNsContext

      Last returned `NamespaceContext`, created for a call to `getNonTransientNamespaceContext()`, iff this would still be a valid context.

    - #### _attrCollector

          protected final AttributeCollector _attrCollector

    - #### _attrCount

          protected int _attrCount

    - #### _pastBytesOrChars

          protected long _pastBytesOrChars

      Number of bytes that were read and processed before the contents of the current buffer; used for calculating absolute offsets.

    - #### _currRow

          protected int _currRow

      The row on which the character to read next is on. Note that it is 0-based, so API will generally add one to it before returning the value

    - #### _rowStartOffset

          protected int _rowStartOffset

      Offset used to calculate the column value given current input buffer pointer. May be negative, if the first character of the row was contained within an earlier buffer.

    - #### _startRawOffset

          protected long _startRawOffset

      Offset (in chars or bytes) at start of current token

    - #### _startRow

          protected long _startRow

      Current row at start of current (last returned) token

    - #### _startColumn

          protected long _startColumn

      Current column at start of current (last returned) token

  - ### Constructor Detail

    - #### XmlScanner

          protected XmlScanner(ReaderConfig cfg)

  - ### Method Detail

    - #### close

          public final void close(boolean forceCloseSource)
                           throws XMLStreamException

      Method called at point when the parsing process has ended (either by encountering end of the input, or via explicit close), and buffers can and should be released.
      Parameters:
        `forceCloseSource` - True if the underlying input source is to be closed, independent of whether auto-close has been set to true via configuration (or if the scanner manages the input source)
      Throws:
        `XMLStreamException`

    - #### _releaseBuffers

          protected void _releaseBuffers()

    - #### _closeSource

          protected abstract void _closeSource()
                                        throws IOException

      Throws:
        `IOException`

    - #### getConfig

          public ReaderConfig getConfig()

    - #### getAttrCollector

          public AttributeCollector getAttrCollector()

    - #### nextFromProlog

          public abstract int nextFromProlog(boolean isProlog)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### nextFromTree

          public abstract int nextFromTree()
                                    throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishToken

          protected abstract void finishToken()
                                       throws XMLStreamException

      This method is called to ensure that the current token/event has been completely parsed, such that we have all the data needed to return it (textual content, PI data, comment text etc)
      Throws:
        `XMLStreamException`

    - #### skipToken

          protected final boolean skipToken()
                                     throws XMLStreamException

      This method is called to essentially skip remaining of the current token (data of PI etc)
      Returns:
        True If by skipping we also figured out following event type (and assigned its type to _currToken); false if that remains to be done
      Throws:
        `XMLStreamException`

    - #### getCurrentLocation

          public abstract org.codehaus.stax2.XMLStreamLocation2 getCurrentLocation()

      Returns:
        Current input location

    - #### getStartLocation

          public final org.codehaus.stax2.XMLStreamLocation2 getStartLocation()

    - #### getStartingByteOffset

          public abstract long getStartingByteOffset()

    - #### getStartingCharOffset

          public abstract long getStartingCharOffset()

    - #### getEndingByteOffset

          public abstract long getEndingByteOffset()
                                            throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getEndingCharOffset

          public abstract long getEndingCharOffset()
                                            throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getEndLocation

          public org.codehaus.stax2.XMLStreamLocation2 getEndLocation()
                                                               throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getCurrentLineNr

          public final int getCurrentLineNr()

    - #### getCurrentColumnNr

          public abstract int getCurrentColumnNr()

    - #### getInputSystemId

          public final String getInputSystemId()

    - #### getInputPublicId

          public final String getInputPublicId()

    - #### hasEmptyStack

          public final boolean hasEmptyStack()

    - #### getDepth

          public final int getDepth()

    - #### isEmptyTag

          public final boolean isEmptyTag()

    - #### getName

          public final PName getName()

    - #### getQName

          public final QName getQName()

    - #### getDTDPublicId

          public final String getDTDPublicId()

    - #### getDTDSystemId

          public final String getDTDSystemId()

    - #### getText

          public final String getText()
                               throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getTextLength

          public final int getTextLength()
                                  throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getTextCharacters

          public final char[] getTextCharacters()
                                         throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getTextCharacters

          public final int getTextCharacters(int srcStart,
                              char[] target,
                              int targetStart,
                              int len)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### getText

          public final int getText(Writer w,
                    boolean preserveContents)
                            throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### isTextWhitespace

          public final boolean isTextWhitespace()
                                         throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### decodeElements

          public final int decodeElements(org.codehaus.stax2.typed.TypedArrayDecoder tad,
                           boolean reset)
                                   throws XMLStreamException

      Method called by the stream reader to decode space-separated tokens that are part of the current text event, using given decoder.
      Parameters:
        `reset` - If true, need to tell text buffer to reset its decoding state; if false, shouldn't
      Throws:
        `XMLStreamException`

    - #### resetForDecoding

          public final void resetForDecoding(org.codehaus.stax2.typed.Base64Variant v,
                              org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec,
                              boolean firstChunk)
                                      throws XMLStreamException

      Method called by the stream reader to reset given base64 decoder with data from the current text event.
      Throws:
        `XMLStreamException`

    - #### fireSaxStartElement

          public void fireSaxStartElement(ContentHandler h,
                                 Attributes attrs)
                                   throws SAXException

      Throws:
        `SAXException`

    - #### fireSaxEndElement

          public void fireSaxEndElement(ContentHandler h)
                                 throws SAXException

      Throws:
        `SAXException`

    - #### fireSaxCharacterEvents

          public void fireSaxCharacterEvents(ContentHandler h)
                                      throws XMLStreamException,
                                             SAXException

      Throws:
        `XMLStreamException`
        `SAXException`

    - #### fireSaxSpaceEvents

          public void fireSaxSpaceEvents(ContentHandler h)
                                  throws XMLStreamException,
                                         SAXException

      Throws:
        `XMLStreamException`
        `SAXException`

    - #### fireSaxCommentEvent

          public void fireSaxCommentEvent(LexicalHandler h)
                                   throws XMLStreamException,
                                          SAXException

      Throws:
        `XMLStreamException`
        `SAXException`

    - #### fireSaxPIEvent

          public void fireSaxPIEvent(ContentHandler h)
                              throws XMLStreamException,
                                     SAXException

      Throws:
        `XMLStreamException`
        `SAXException`

    - #### getAttrCount

          public final int getAttrCount()

    - #### getAttrLocalName

          public final String getAttrLocalName(int index)

    - #### getAttrQName

          public final QName getAttrQName(int index)

    - #### getAttrPrefixedName

          public final String getAttrPrefixedName(int index)

    - #### getAttrNsURI

          public final String getAttrNsURI(int index)

    - #### getAttrPrefix

          public final String getAttrPrefix(int index)

    - #### getAttrValue

          public final String getAttrValue(int index)

    - #### getAttrValue

          public final String getAttrValue(String nsURI,
                            String localName)

    - #### decodeAttrValue

          public final void decodeAttrValue(int index,
                             org.codehaus.stax2.typed.TypedValueDecoder tvd)
                                     throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### decodeAttrValues

          public final int decodeAttrValues(int index,
                             org.codehaus.stax2.typed.TypedArrayDecoder tad)
                                     throws XMLStreamException

      Method called to decode the attribute value that consists of zero or more space-separated tokens. Decoding is done using the decoder provided.
      Returns:
        Number of tokens decoded
      Throws:
        `XMLStreamException`

    - #### decodeAttrBinaryValue

          public final byte[] decodeAttrBinaryValue(int index,
                                     org.codehaus.stax2.typed.Base64Variant v,
                                     org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec)
                                             throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### findAttrIndex

          public final int findAttrIndex(String nsURI,
                          String localName)

    - #### getAttrType

          public final String getAttrType(int index)

    - #### isAttrSpecified

          public final boolean isAttrSpecified(int index)

    - #### getNsCount

          public final int getNsCount()

    - #### getNamespacePrefix

          public final String getNamespacePrefix(int index)

    - #### getNamespaceURI

          public final String getNamespaceURI(int index)

    - #### getNamespaceURI

          public final String getNamespaceURI()

    - #### getNonTransientNamespaceContext

          public final NamespaceContext getNonTransientNamespaceContext()

    - #### getNamespaceURI

          public String getNamespaceURI(String prefix)

      Specified by:
        `getNamespaceURI` in interface `NamespaceContext`

    - #### getPrefix

          public String getPrefix(String nsURI)

      Specified by:
        `getPrefix` in interface `NamespaceContext`

    - #### getPrefixes

          public Iterator<String> getPrefixes(String nsURI)

      Specified by:
        `getPrefixes` in interface `NamespaceContext`

    - #### finishCharacters

          protected abstract void finishCharacters()
                                            throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishCData

          protected abstract void finishCData()
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishComment

          protected abstract void finishComment()
                                         throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishDTD

          protected abstract void finishDTD(boolean copyContents)
                                     throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishPI

          protected abstract void finishPI()
                                    throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### finishSpace

          protected abstract void finishSpace()
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### skipCharacters

          protected abstract boolean skipCharacters()
                                             throws XMLStreamException

      Returns:
        True, if an unexpanded entity was encountered (and is now pending)
      Throws:
        `XMLStreamException`

    - #### skipCData

          protected abstract void skipCData()
                                     throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### skipComment

          protected abstract void skipComment()
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### skipPI

          protected abstract void skipPI()
                                  throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### skipSpace

          protected abstract void skipSpace()
                                     throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### skipCoalescedText

          protected abstract boolean skipCoalescedText()
                                                throws XMLStreamException

      Secondary skip method called after primary text segment has been skipped, and we are in coalescing mode.
      Returns:
        True, if an unexpanded entity was encountered (and is now pending)
      Throws:
        `XMLStreamException`

    - #### loadMore

          protected abstract boolean loadMore()
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### bindName

          protected final PName bindName(PName name,
                       String prefix)

      This method is called to find/create a fully qualified (bound) name (element / attribute), for a name with prefix. For non-prefixed names this method will not get called

    - #### findOrCreateBinding

          protected final com.fasterxml.aalto.in.NsBinding findOrCreateBinding(String prefix)
                                                                        throws XMLStreamException

      Method called when a namespace declaration needs to find the binding object (essentially a per-prefix-per-document canonical container object)
      Throws:
        `XMLStreamException`

    - #### bindNs

          protected final void bindNs(PName name,
                    String uri)
                               throws XMLStreamException

      Method called when we are ready to bind a declared namespace.
      Throws:
        `XMLStreamException`

    - #### checkImmutableBinding

          protected final void checkImmutableBinding(String prefix,
                                   String uri)
                                              throws XMLStreamException

      Method called when an immutable ns prefix (xml, xmlns) is encountered.
      Throws:
        `XMLStreamException`

    - #### loadMoreGuaranteed

          protected final void loadMoreGuaranteed()
                                           throws XMLStreamException

      Method that tries to load at least one more byte into buffer; and if that fails, throws an appropriate EOI exception.
      Throws:
        `XMLStreamException`

    - #### loadMoreGuaranteed

          protected final void loadMoreGuaranteed(int tt)
                                           throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### verifyXmlChar

          protected final void verifyXmlChar(int value)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportInputProblem

          protected void reportInputProblem(String msg)
                                     throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportUnexpandedEntityInAttr

          protected void reportUnexpandedEntityInAttr(PName name,
                                          boolean isNsDecl)
                                               throws XMLStreamException

      Method called when a call to expand an entity within attribute value fails to expand it.
      Throws:
        `XMLStreamException`

    - #### reportPrologUnexpElement

          protected void reportPrologUnexpElement(boolean isProlog,
                                      int ch)
                                           throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportPrologUnexpChar

          protected void reportPrologUnexpChar(boolean isProlog,
                                   int ch,
                                   String msg)
                                        throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportPrologProblem

          protected void reportPrologProblem(boolean isProlog,
                                 String msg)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportTreeUnexpChar

          protected void reportTreeUnexpChar(int ch,
                                 String msg)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportInvalidNameChar

          protected void reportInvalidNameChar(int ch,
                                   int index)
                                        throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportInvalidXmlChar

          protected void reportInvalidXmlChar(int ch)
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportEofInName

          protected void reportEofInName(char[] cbuf,
                             int clen)
                                  throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportMissingPISpace

          protected void reportMissingPISpace(int ch)
                                       throws XMLStreamException

      Called when there's an unexpected char after PI target (non-ws, not part of '?>' end marker
      Throws:
        `XMLStreamException`

    - #### reportDoubleHyphenInComments

          protected void reportDoubleHyphenInComments()
                                               throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportMultipleColonsInName

          protected void reportMultipleColonsInName()
                                             throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportEntityOverflow

          protected void reportEntityOverflow()
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportInvalidNsIndex

          protected void reportInvalidNsIndex(int index)

    - #### reportUnboundPrefix

          protected void reportUnboundPrefix(PName name,
                                 boolean isAttr)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportDuplicateNsDecl

          protected void reportDuplicateNsDecl(String prefix)
                                        throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportIllegalNsDecl

          protected void reportIllegalNsDecl(String prefix)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportIllegalNsDecl

          protected void reportIllegalNsDecl(String prefix,
                                 String uri)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportUnexpectedEndTag

          protected void reportUnexpectedEndTag(String expName)
                                         throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### reportIllegalCDataEnd

          protected void reportIllegalCDataEnd()
                                        throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### throwUnexpectedChar

          protected void throwUnexpectedChar(int i,
                                 String msg)
                                      throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### throwNullChar

          protected void throwNullChar()
                                throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### handleInvalidXmlChar

          protected char handleInvalidXmlChar(int i)
                                       throws XMLStreamException

      Throws:
        `XMLStreamException`

    - #### throwInvalidSpace

          protected void throwInvalidSpace(int i)
                                    throws XMLStreamException

      Throws:
        `XMLStreamException`

Copyright © 2018 FasterXML. All rights reserved.