public abstract class AsyncByteScanner extends ByteBasedScanner implements AsyncInputFeeder
Modifier and Type | Field and Description |
---|---|
protected XmlCharTypes |
_charTypes
This is a simple container object that is used to access the
decoding tables for characters.
|
protected int |
_currQuad
Bytes parsed for the current, incomplete, quad
|
protected int |
_currQuadBytes
Number of bytes pending/buffered, stored in
_currQuad |
protected boolean |
_elemAllNsBound |
protected boolean |
_elemAttrCount |
protected PName |
_elemAttrName |
protected int |
_elemAttrPtr
Pointer for the next character of currently being parsed value
within attribute value buffer
|
protected byte |
_elemAttrQuote |
protected int |
_elemNsPtr
Pointer for the next character of currently being parsed namespace
URI for the current namespace declaration
|
protected boolean |
_endOfInput
Flag that is sent when calling application indicates that there will
be no more input to parse.
|
protected int |
_entityValue
Entity value accumulated so far
|
protected boolean |
_inDtdDeclaration
Flag that indicates whether we are inside a declaration during parsing
of internal DTD subset.
|
protected int |
_nextEvent
Due to asynchronous nature of parsing, we may know what
event we are trying to parse, even if it's not yet
complete.
|
protected int |
_pendingInput
There are some multi-byte combinations that must be handled
as a unit: CR+LF linefeeds, multi-byte UTF-8 characters, and
multi-character end markers for comments and PIs.
|
protected int[] |
_quadBuffer
This buffer is used for name parsing.
|
protected int |
_quadCount
Number of complete quads parsed for current name (quads
themselves are stored in
_quadBuffer ). |
protected int |
_state
In addition to the event type, there is need for additional
state information
|
protected int |
_surroundingEvent
For token/state combinations that are 'shared' between
events (or embedded in them), this is where the surrounding
event state is retained.
|
protected ByteBasedPNameTable |
_symbols
For now, symbol table contains prefixed names.
|
protected static int |
EVENT_INCOMPLETE |
protected static int |
PENDING_STATE_ATTR_VALUE_AMP |
protected static int |
PENDING_STATE_ATTR_VALUE_AMP_HASH |
protected static int |
PENDING_STATE_ATTR_VALUE_AMP_HASH_X |
protected static int |
PENDING_STATE_ATTR_VALUE_DEC_DIGIT |
protected static int |
PENDING_STATE_ATTR_VALUE_ENTITY_NAME |
protected static int |
PENDING_STATE_ATTR_VALUE_HEX_DIGIT |
protected static int |
PENDING_STATE_CDATA_BRACKET1 |
protected static int |
PENDING_STATE_CDATA_BRACKET2 |
protected static int |
PENDING_STATE_COMMENT_HYPHEN1 |
protected static int |
PENDING_STATE_COMMENT_HYPHEN2 |
protected static int |
PENDING_STATE_CR |
protected static int |
PENDING_STATE_ENT_IN_DEC_DIGIT |
protected static int |
PENDING_STATE_ENT_IN_HEX_DIGIT |
protected static int |
PENDING_STATE_ENT_SEEN_HASH |
protected static int |
PENDING_STATE_ENT_SEEN_HASH_X |
protected static int |
PENDING_STATE_PI_QMARK |
protected static int |
PENDING_STATE_TEXT_AMP |
protected static int |
PENDING_STATE_TEXT_AMP_HASH |
protected static int |
PENDING_STATE_TEXT_BRACKET1 |
protected static int |
PENDING_STATE_TEXT_BRACKET2 |
protected static int |
PENDING_STATE_TEXT_DEC_ENTITY |
protected static int |
PENDING_STATE_TEXT_HEX_ENTITY |
protected static int |
PENDING_STATE_TEXT_IN_ENTITY |
protected static int |
PENDING_STATE_XMLDECL_LT |
protected static int |
PENDING_STATE_XMLDECL_LTQ |
protected static int |
PENDING_STATE_XMLDECL_TARGET |
protected static int |
STATE_CDATA_C |
protected static int |
STATE_CDATA_CD |
protected static int |
STATE_CDATA_CDA |
protected static int |
STATE_CDATA_CDAT |
protected static int |
STATE_CDATA_CDATA |
protected static int |
STATE_CDATA_CONTENT |
protected static int |
STATE_COMMENT_CONTENT |
protected static int |
STATE_COMMENT_HYPHEN |
protected static int |
STATE_COMMENT_HYPHEN2 |
protected static int |
STATE_DEFAULT
Default starting state for many events/contexts -- nothing has been
seen so far, no event incomplete.
|
protected static int |
STATE_DTD_AFTER_DOCTYPE |
protected static int |
STATE_DTD_AFTER_PUBLIC |
protected static int |
STATE_DTD_AFTER_PUBLIC_ID |
protected static int |
STATE_DTD_AFTER_ROOT_NAME |
protected static int |
STATE_DTD_AFTER_SYSTEM |
protected static int |
STATE_DTD_AFTER_SYSTEM_ID |
protected static int |
STATE_DTD_BEFORE_IDS |
protected static int |
STATE_DTD_BEFORE_PUBLIC_ID |
protected static int |
STATE_DTD_BEFORE_ROOT_NAME |
protected static int |
STATE_DTD_BEFORE_SYSTEM_ID |
protected static int |
STATE_DTD_DOCTYPE |
protected static int |
STATE_DTD_EXPECT_CLOSING_GT |
protected static int |
STATE_DTD_INT_SUBSET |
protected static int |
STATE_DTD_PUBLIC_ID |
protected static int |
STATE_DTD_PUBLIC_OR_SYSTEM |
protected static int |
STATE_DTD_ROOT_NAME |
protected static int |
STATE_DTD_SYSTEM_ID |
protected static int |
STATE_EE_NEED_GT |
protected static int |
STATE_PI_AFTER_TARGET |
protected static int |
STATE_PI_AFTER_TARGET_QMARK |
protected static int |
STATE_PI_AFTER_TARGET_WS |
protected static int |
STATE_PI_IN_DATA |
protected static int |
STATE_PI_IN_TARGET |
protected static int |
STATE_PROLOG_DECL |
protected static int |
STATE_PROLOG_INITIAL
State in which a less-than sign has been seen
|
protected static int |
STATE_PROLOG_SEEN_LT |
protected static int |
STATE_SE_ATTR_NAME |
protected static int |
STATE_SE_ATTR_VALUE_NORMAL |
protected static int |
STATE_SE_ATTR_VALUE_NSDECL |
protected static int |
STATE_SE_ELEM_NAME |
protected static int |
STATE_SE_SEEN_SLASH |
protected static int |
STATE_SE_SPACE_OR_ATTRNAME |
protected static int |
STATE_SE_SPACE_OR_ATTRVALUE |
protected static int |
STATE_SE_SPACE_OR_END |
protected static int |
STATE_SE_SPACE_OR_EQ |
protected static int |
STATE_TEXT_AMP |
protected static int |
STATE_TEXT_AMP_NAME |
protected static int |
STATE_TREE_NAMED_ENTITY_START |
protected static int |
STATE_TREE_NUMERIC_ENTITY_START |
protected static int |
STATE_TREE_SEEN_AMP |
protected static int |
STATE_TREE_SEEN_EXCL |
protected static int |
STATE_TREE_SEEN_LT |
protected static int |
STATE_TREE_SEEN_SLASH |
protected static int |
STATE_XMLDECL_AFTER_ENCODING |
protected static int |
STATE_XMLDECL_AFTER_ENCODING_VALUE |
protected static int |
STATE_XMLDECL_AFTER_STANDALONE |
protected static int |
STATE_XMLDECL_AFTER_STANDALONE_VALUE |
protected static int |
STATE_XMLDECL_AFTER_VERSION |
protected static int |
STATE_XMLDECL_AFTER_VERSION_VALUE |
protected static int |
STATE_XMLDECL_AFTER_XML |
protected static int |
STATE_XMLDECL_BEFORE_ENCODING |
protected static int |
STATE_XMLDECL_BEFORE_STANDALONE |
protected static int |
STATE_XMLDECL_BEFORE_VERSION |
protected static int |
STATE_XMLDECL_ENCODING |
protected static int |
STATE_XMLDECL_ENCODING_EQ |
protected static int |
STATE_XMLDECL_ENCODING_VALUE |
protected static int |
STATE_XMLDECL_ENDQ |
protected static int |
STATE_XMLDECL_STANDALONE |
protected static int |
STATE_XMLDECL_STANDALONE_EQ |
protected static int |
STATE_XMLDECL_STANDALONE_VALUE |
protected static int |
STATE_XMLDECL_VERSION |
protected static int |
STATE_XMLDECL_VERSION_EQ |
protected static int |
STATE_XMLDECL_VERSION_VALUE |
_inputEnd, _inputPtr, _tmpChar, BYTE_a, BYTE_A, BYTE_AMP, BYTE_APOS, BYTE_C, BYTE_CR, BYTE_D, BYTE_EQ, BYTE_EXCL, BYTE_g, BYTE_GT, BYTE_HASH, BYTE_HYPHEN, BYTE_l, BYTE_LBRACKET, BYTE_LF, BYTE_LT, BYTE_m, BYTE_NULL, BYTE_o, BYTE_p, BYTE_P, BYTE_q, BYTE_QMARK, BYTE_QUOT, BYTE_RBRACKET, BYTE_s, BYTE_S, BYTE_SEMICOLON, BYTE_SLASH, BYTE_SPACE, BYTE_t, BYTE_T, BYTE_TAB, BYTE_u, BYTE_x
_attrCollector, _attrCount, _cfgCoalescing, _cfgLazyParsing, _config, _currElem, _currNsCount, _currRow, _currToken, _defaultNs, _depth, _entityPending, _isEmptyTag, _lastNsContext, _lastNsDecl, _nameBuffer, _nsBindingCache, _nsBindingCount, _nsBindings, _nsBindMisses, _pastBytesOrChars, _publicId, _rowStartOffset, _startColumn, _startRawOffset, _startRow, _systemId, _textBuilder, _tokenIncomplete, _tokenName, _xml11, CDATA_STR, INT_0, INT_9, INT_a, INT_A, INT_AMP, INT_APOS, INT_COLON, INT_CR, INT_EQ, INT_EXCL, INT_f, INT_F, INT_GT, INT_HYPHEN, INT_LBRACKET, INT_LF, INT_LT, INT_NULL, INT_QMARK, INT_QUOTE, INT_RBRACKET, INT_SLASH, INT_SPACE, INT_TAB, INT_z, MAX_UNICODE_CHAR, TOKEN_EOI
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
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Modifier | Constructor and Description |
---|---|
protected |
AsyncByteScanner(ReaderConfig cfg) |
Modifier and Type | Method and Description |
---|---|
protected void |
_activateEncoding()
Initialization method to call when encoding has been definitely figured out,
from XML declarations, or, from lack of one (using defaults).
|
protected void |
_closeSource()
Since the async scanner has no access to whatever passes content,
there is no input source in same sense as with blocking scanner;
and there is nothing to close.
|
protected abstract byte |
_currentByte() |
protected PName |
_findXmlDeclName(int lastQuad,
int lastByteCount) |
protected abstract byte |
_nextByte() |
protected abstract byte |
_prevByte() |
protected void |
_releaseBuffers() |
protected int |
_startDocumentNoXmlDecl()
Helper method called when it is determined that the document does NOT start with
an xml declaration.
|
protected PName |
addPName(ByteBasedPNameTable symbols,
int hash,
int[] quads,
int qlen,
int lastQuadBytes) |
protected abstract boolean |
asyncSkipSpace() |
protected void |
checkPITargetName(PName targetName) |
protected int |
decodeCharForError(byte b)
Method called by methods when encountering a byte that
can not be part of a valid character in the current context.
|
void |
endOfInput()
Method that should be called after last chunk of data to parse has been fed.
|
protected PName |
findPName(int lastQuad,
int lastByteCount)
Method called to process a sequence of bytes that is likely to
be a PName.
|
protected void |
finishCData() |
protected abstract void |
finishCharacters() |
protected void |
finishComment() |
protected void |
finishDTD(boolean copyContents) |
protected void |
finishPI() |
protected void |
finishSpace() |
protected 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)
|
protected abstract boolean |
handleAttrValue() |
protected abstract int |
handleComment() |
protected abstract boolean |
handleDTDInternalSubset(boolean init) |
protected abstract boolean |
handleNsDecl() |
protected abstract boolean |
handlePartialCR() |
protected abstract int |
handlePI() |
protected abstract int |
handleStartElement() |
protected abstract int |
handleStartElementStart(byte b) |
protected boolean |
loadMore() |
int |
nextFromProlog(boolean isProlog) |
protected abstract PName |
parseNewName(byte b) |
protected abstract PName |
parsePName() |
protected boolean |
parseXmlDeclAttr(char[] outputBuffer,
int outputPtr)
Method called to try to parse an XML pseudo-attribute value.
|
protected void |
reportInvalidOther(int mask,
int ptr) |
protected void |
skipCData() |
protected abstract boolean |
skipCharacters() |
protected void |
skipComment() |
protected void |
skipPI() |
protected void |
skipSpace() |
protected abstract int |
startCharacters(byte b)
Method called to initialize state for CHARACTERS event, after
just a single byte has been seen.
|
protected int |
throwInternal() |
protected boolean |
validPublicIdChar(int c)
Checks that a character for a PublicId
|
protected void |
verifyAndAppendEntityCharacter(int charFromEntity)
Method called to verify validity of given character (from entity) and
append it to the text buffer
|
protected void |
verifyAndSetPublicId() |
protected void |
verifyAndSetSystemId() |
protected void |
verifyAndSetXmlEncoding() |
protected void |
verifyAndSetXmlStandalone() |
protected void |
verifyAndSetXmlVersion() |
addUTFPName, getCurrentColumnNr, getCurrentLocation, getEndingByteOffset, getEndingCharOffset, getStartingByteOffset, getStartingCharOffset, markLF, markLF, reportInvalidInitial, reportInvalidOther, setStartLocation
bindName, bindNs, checkImmutableBinding, close, decodeAttrBinaryValue, decodeAttrValue, decodeAttrValues, decodeElements, findAttrIndex, findOrCreateBinding, fireSaxCharacterEvents, fireSaxCommentEvent, fireSaxEndElement, fireSaxPIEvent, fireSaxSpaceEvents, fireSaxStartElement, getAttrCollector, getAttrCount, getAttrLocalName, getAttrNsURI, getAttrPrefix, getAttrPrefixedName, getAttrQName, getAttrType, getAttrValue, getAttrValue, getConfig, getCurrentLineNr, getDepth, getDTDPublicId, getDTDSystemId, getEndLocation, getInputPublicId, getInputSystemId, getName, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getNonTransientNamespaceContext, getNsCount, getPrefix, getPrefixes, getQName, getStartLocation, getText, getText, getTextCharacters, getTextCharacters, getTextLength, handleInvalidXmlChar, hasEmptyStack, isAttrSpecified, isEmptyTag, isTextWhitespace, loadMoreGuaranteed, loadMoreGuaranteed, nextFromTree, reportDoubleHyphenInComments, reportDuplicateNsDecl, reportEntityOverflow, reportEofInName, reportIllegalCDataEnd, reportIllegalNsDecl, reportIllegalNsDecl, reportInputProblem, reportInvalidNameChar, reportInvalidNsIndex, reportInvalidXmlChar, reportMissingPISpace, reportMultipleColonsInName, reportPrologProblem, reportPrologUnexpChar, reportPrologUnexpElement, reportTreeUnexpChar, reportUnboundPrefix, reportUnexpandedEntityInAttr, reportUnexpectedEndTag, resetForDecoding, skipCoalescedText, skipToken, throwInvalidSpace, throwNullChar, throwUnexpectedChar, verifyXmlChar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
needMoreInput
protected static final int EVENT_INCOMPLETE
protected static final int STATE_DEFAULT
protected static final int STATE_PROLOG_INITIAL
protected static final int STATE_PROLOG_SEEN_LT
protected static final int STATE_PROLOG_DECL
protected static final int STATE_TREE_SEEN_LT
protected static final int STATE_TREE_SEEN_AMP
protected static final int STATE_TREE_SEEN_EXCL
protected static final int STATE_TREE_SEEN_SLASH
protected static final int STATE_TREE_NUMERIC_ENTITY_START
protected static final int STATE_TREE_NAMED_ENTITY_START
protected static final int STATE_XMLDECL_AFTER_XML
protected static final int STATE_XMLDECL_BEFORE_VERSION
protected static final int STATE_XMLDECL_VERSION
protected static final int STATE_XMLDECL_AFTER_VERSION
protected static final int STATE_XMLDECL_VERSION_EQ
protected static final int STATE_XMLDECL_VERSION_VALUE
protected static final int STATE_XMLDECL_AFTER_VERSION_VALUE
protected static final int STATE_XMLDECL_BEFORE_ENCODING
protected static final int STATE_XMLDECL_ENCODING
protected static final int STATE_XMLDECL_AFTER_ENCODING
protected static final int STATE_XMLDECL_ENCODING_EQ
protected static final int STATE_XMLDECL_ENCODING_VALUE
protected static final int STATE_XMLDECL_AFTER_ENCODING_VALUE
protected static final int STATE_XMLDECL_BEFORE_STANDALONE
protected static final int STATE_XMLDECL_STANDALONE
protected static final int STATE_XMLDECL_AFTER_STANDALONE
protected static final int STATE_XMLDECL_STANDALONE_EQ
protected static final int STATE_XMLDECL_STANDALONE_VALUE
protected static final int STATE_XMLDECL_AFTER_STANDALONE_VALUE
protected static final int STATE_XMLDECL_ENDQ
protected static final int STATE_DTD_DOCTYPE
protected static final int STATE_DTD_AFTER_DOCTYPE
protected static final int STATE_DTD_BEFORE_ROOT_NAME
protected static final int STATE_DTD_ROOT_NAME
protected static final int STATE_DTD_AFTER_ROOT_NAME
protected static final int STATE_DTD_BEFORE_IDS
protected static final int STATE_DTD_PUBLIC_OR_SYSTEM
protected static final int STATE_DTD_AFTER_PUBLIC
protected static final int STATE_DTD_AFTER_SYSTEM
protected static final int STATE_DTD_BEFORE_PUBLIC_ID
protected static final int STATE_DTD_PUBLIC_ID
protected static final int STATE_DTD_AFTER_PUBLIC_ID
protected static final int STATE_DTD_BEFORE_SYSTEM_ID
protected static final int STATE_DTD_SYSTEM_ID
protected static final int STATE_DTD_AFTER_SYSTEM_ID
protected static final int STATE_DTD_INT_SUBSET
protected static final int STATE_DTD_EXPECT_CLOSING_GT
protected static final int STATE_TEXT_AMP
protected static final int STATE_TEXT_AMP_NAME
protected static final int STATE_COMMENT_CONTENT
protected static final int STATE_COMMENT_HYPHEN
protected static final int STATE_COMMENT_HYPHEN2
protected static final int STATE_CDATA_CONTENT
protected static final int STATE_CDATA_C
protected static final int STATE_CDATA_CD
protected static final int STATE_CDATA_CDA
protected static final int STATE_CDATA_CDAT
protected static final int STATE_CDATA_CDATA
protected static final int STATE_PI_AFTER_TARGET
protected static final int STATE_PI_AFTER_TARGET_WS
protected static final int STATE_PI_AFTER_TARGET_QMARK
protected static final int STATE_PI_IN_TARGET
protected static final int STATE_PI_IN_DATA
protected static final int STATE_SE_ELEM_NAME
protected static final int STATE_SE_SPACE_OR_END
protected static final int STATE_SE_SPACE_OR_ATTRNAME
protected static final int STATE_SE_ATTR_NAME
protected static final int STATE_SE_SPACE_OR_EQ
protected static final int STATE_SE_SPACE_OR_ATTRVALUE
protected static final int STATE_SE_ATTR_VALUE_NORMAL
protected static final int STATE_SE_ATTR_VALUE_NSDECL
protected static final int STATE_SE_SEEN_SLASH
protected static final int STATE_EE_NEED_GT
protected static final int PENDING_STATE_CR
protected static final int PENDING_STATE_XMLDECL_LT
protected static final int PENDING_STATE_XMLDECL_LTQ
protected static final int PENDING_STATE_XMLDECL_TARGET
protected static final int PENDING_STATE_PI_QMARK
protected static final int PENDING_STATE_COMMENT_HYPHEN1
protected static final int PENDING_STATE_COMMENT_HYPHEN2
protected static final int PENDING_STATE_CDATA_BRACKET1
protected static final int PENDING_STATE_CDATA_BRACKET2
protected static final int PENDING_STATE_ENT_SEEN_HASH
protected static final int PENDING_STATE_ENT_SEEN_HASH_X
protected static final int PENDING_STATE_ENT_IN_DEC_DIGIT
protected static final int PENDING_STATE_ENT_IN_HEX_DIGIT
protected static final int PENDING_STATE_ATTR_VALUE_AMP
protected static final int PENDING_STATE_ATTR_VALUE_AMP_HASH
protected static final int PENDING_STATE_ATTR_VALUE_AMP_HASH_X
protected static final int PENDING_STATE_ATTR_VALUE_ENTITY_NAME
protected static final int PENDING_STATE_ATTR_VALUE_DEC_DIGIT
protected static final int PENDING_STATE_ATTR_VALUE_HEX_DIGIT
protected static final int PENDING_STATE_TEXT_AMP
protected static final int PENDING_STATE_TEXT_AMP_HASH
protected static final int PENDING_STATE_TEXT_DEC_ENTITY
protected static final int PENDING_STATE_TEXT_HEX_ENTITY
protected static final int PENDING_STATE_TEXT_IN_ENTITY
protected static final int PENDING_STATE_TEXT_BRACKET1
protected static final int PENDING_STATE_TEXT_BRACKET2
protected XmlCharTypes _charTypes
NOTE: non-final due to xml declaration handling occurring later.
protected ByteBasedPNameTable _symbols
NOTE: non-final for async scanners
protected int[] _quadBuffer
protected int _nextEvent
protected int _state
protected int _surroundingEvent
protected int _pendingInput
If so, this int will store byte(s), in little-endian format (that is, first pending byte is at 0x000000FF, second [if any] at 0x0000FF00, and third at 0x00FF0000). This can be (and is) used to figure out actual number of bytes pending, for multi-byte (UTF-8) character decoding.
Note: it is assumed that if value is 0, there is no data. Thus, if 0 needed to be added pending, it has to be masked.
protected boolean _endOfInput
protected int _quadCount
_quadBuffer
).protected int _currQuad
protected int _currQuadBytes
_currQuad
protected int _entityValue
protected boolean _elemAllNsBound
protected boolean _elemAttrCount
protected byte _elemAttrQuote
protected PName _elemAttrName
protected int _elemAttrPtr
protected int _elemNsPtr
protected boolean _inDtdDeclaration
protected AsyncByteScanner(ReaderConfig cfg)
protected void _activateEncoding()
public void endOfInput()
AsyncInputFeeder
AsyncInputFeeder.needMoreInput()
returns.
After calling this method, no more data can be fed; and parser assumes
no more data will be available.endOfInput
in interface AsyncInputFeeder
protected void _releaseBuffers()
_releaseBuffers
in class XmlScanner
protected void _closeSource() throws IOException
_closeSource
in class ByteBasedScanner
IOException
protected void verifyAndSetXmlVersion() throws XMLStreamException
XMLStreamException
protected void verifyAndSetXmlEncoding() throws XMLStreamException
XMLStreamException
protected void verifyAndSetXmlStandalone() throws XMLStreamException
XMLStreamException
protected void verifyAndSetPublicId() throws XMLStreamException
XMLStreamException
protected void verifyAndSetSystemId() throws XMLStreamException
XMLStreamException
protected abstract byte _currentByte() throws XMLStreamException
XMLStreamException
protected abstract byte _nextByte() throws XMLStreamException
XMLStreamException
protected abstract byte _prevByte() throws XMLStreamException
XMLStreamException
protected abstract int handlePI() throws XMLStreamException
XMLStreamException
protected abstract boolean handleDTDInternalSubset(boolean init) throws XMLStreamException
XMLStreamException
protected abstract int handleComment() throws XMLStreamException
XMLStreamException
protected abstract int handleStartElementStart(byte b) throws XMLStreamException
XMLStreamException
protected abstract int handleStartElement() throws XMLStreamException
XMLStreamException
protected abstract PName parsePName() throws XMLStreamException
XMLStreamException
protected abstract PName parseNewName(byte b) throws XMLStreamException
XMLStreamException
protected abstract boolean asyncSkipSpace() throws XMLStreamException
XMLStreamException
protected abstract boolean handlePartialCR() throws XMLStreamException
XMLStreamException
protected final void finishToken() throws XMLStreamException
XmlScanner
finishToken
in class XmlScanner
XMLStreamException
protected abstract int startCharacters(byte b) throws XMLStreamException
XMLStreamReader.next()
returns, no
blocking can occur when calling other methods.XMLStreamException
protected abstract boolean handleAttrValue() throws XMLStreamException
XMLStreamException
protected abstract boolean handleNsDecl() throws XMLStreamException
XMLStreamException
protected void finishCData() throws XMLStreamException
finishCData
in class XmlScanner
XMLStreamException
protected void finishComment() throws XMLStreamException
finishComment
in class XmlScanner
XMLStreamException
protected void finishDTD(boolean copyContents) throws XMLStreamException
finishDTD
in class XmlScanner
XMLStreamException
protected void finishPI() throws XMLStreamException
finishPI
in class XmlScanner
XMLStreamException
protected void finishSpace() throws XMLStreamException
finishSpace
in class XmlScanner
XMLStreamException
protected abstract boolean skipCharacters() throws XMLStreamException
skipCharacters
in class XmlScanner
XMLStreamException
protected void skipCData() throws XMLStreamException
skipCData
in class XmlScanner
XMLStreamException
protected void skipComment() throws XMLStreamException
skipComment
in class XmlScanner
XMLStreamException
protected void skipPI() throws XMLStreamException
skipPI
in class XmlScanner
XMLStreamException
protected void skipSpace() throws XMLStreamException
skipSpace
in class XmlScanner
XMLStreamException
protected boolean loadMore() throws XMLStreamException
loadMore
in class XmlScanner
XMLStreamException
protected abstract void finishCharacters() throws XMLStreamException
finishCharacters
in class XmlScanner
XMLStreamException
protected final PName findPName(int lastQuad, int lastByteCount) throws XMLStreamException
lastQuad
- Word with last 0 to 3 bytes of the PName; not included
in the quad arraylastByteCount
- Number of bytes contained in lastQuad; 0 to 3.firstQuad
- First 1 to 4 bytes of the PName (4 if length
at least 4 bytes; less only if not).qlen
- Number of quads in the array, except if less than 2
(in which case only firstQuad and lastQuad are used)quads
- Array that contains all the quads, except for the
last one, for names with more than 8 bytes (i.e. more than
2 quads)XMLStreamException
protected final PName addPName(ByteBasedPNameTable symbols, int hash, int[] quads, int qlen, int lastQuadBytes) throws XMLStreamException
XMLStreamException
protected void verifyAndAppendEntityCharacter(int charFromEntity) throws XMLStreamException
XMLStreamException
protected boolean validPublicIdChar(int c)
c
- A characterprotected int decodeCharForError(byte b) throws XMLStreamException
ByteBasedScanner
decodeCharForError
in class ByteBasedScanner
XMLStreamException
protected void checkPITargetName(PName targetName) throws XMLStreamException
XMLStreamException
protected int throwInternal()
protected void reportInvalidOther(int mask, int ptr) throws XMLStreamException
XMLStreamException
public final int nextFromProlog(boolean isProlog) throws XMLStreamException
nextFromProlog
in class XmlScanner
XMLStreamException
protected int _startDocumentNoXmlDecl() throws XMLStreamException
XMLStreamException
protected final PName _findXmlDeclName(int lastQuad, int lastByteCount) throws XMLStreamException
XMLStreamException
protected boolean parseXmlDeclAttr(char[] outputBuffer, int outputPtr) throws XMLStreamException
NOTE: pseudo-attribute values required to be 7-bit ASCII so can do crude cast.
XMLStreamException
Copyright © 2018 FasterXML. All rights reserved.