public class AsyncUtfScanner extends AsyncByteScanner
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_inDtdDeclaration
Flag that indicates whether we are inside a declaration during parsing
of internal DTD subset.
|
_currQuad, _currQuadBytes, _elemAllNsBound, _elemAttrCount, _elemAttrName, _elemAttrPtr, _elemAttrQuote, _elemNsPtr, _endOfInput, _entityValue, _inputBuffer, _nextEvent, _origBufferLen, _pendingInput, _quadCount, _state, _surroundingEvent_charTypes, _inputEnd, _inputPtr, _pastBytes, _quadBuffer, _rowStartOffset, _symbols, _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, _publicId, _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_EOICHAR_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_UNKNOWNATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT| Constructor and Description |
|---|
AsyncUtfScanner(ReaderConfig cfg) |
| Modifier and Type | Method and Description |
|---|---|
protected PName |
addPName(int hash,
int[] quads,
int qlen,
int lastQuadBytes) |
protected int |
decodeUtf8_2(int c)
Note: caller must guarantee enough data is available before
calling the method
|
protected int |
decodeUtf8_3(int c1)
Note: caller must guarantee enough data is available before
calling the method
|
protected int |
decodeUtf8_3(int c1,
int c2,
int c3) |
protected int |
decodeUtf8_4(int c) |
protected int |
decodeUtf8_4(int c1,
int c2,
int c3,
int c4) |
protected void |
finishCharacters()
This method only gets called in non-coalescing mode; and if so,
needs to parse as many characters of the current text segment
from the current input block as possible.
|
protected int |
finishCharactersCoalescing() |
protected boolean |
handleAttrValue() |
protected int |
handleCDataPending() |
protected int |
handleCommentPending() |
protected int |
handleDecEntityInCharacters(int ptr) |
protected boolean |
handleDTDInternalSubset(boolean init) |
protected int |
handleEntityInAttributeValue()
Method called to handle entity encountered inside attribute value.
|
protected int |
handleEntityInCharacters()
Method called to handle entity encountered inside
CHARACTERS segment, when trying to complete a non-coalescing text segment.
|
protected int |
handleHexEntityInCharacters(int ptr) |
protected boolean |
handleNsDecl() |
protected int |
handlePIPending() |
protected int |
parseCDataContents() |
protected int |
parseCommentContents() |
protected int |
parsePIData() |
protected void |
reportInvalidInitial(int mask) |
protected void |
reportInvalidOther(int mask) |
protected void |
reportInvalidOther(int mask,
int ptr) |
protected boolean |
skipCharacters()
Method that will be called to skip all possible characters
from the input buffer, but without blocking.
|
protected boolean |
skipCoalescedText()
Coalescing mode is (and will) not be implemented for non-blocking
parsers, so this method should never get called.
|
protected void |
skipUtf8_2(int c) |
protected int |
startCharacters(byte b)
Method called to initialize state for CHARACTERS event, after
just a single byte has been seen.
|
protected int |
startCharactersPending()
This method gets called, if the first character of a
CHARACTERS event could not be fully read (multi-byte,
split over buffer boundary).
|
_closeSource, decodeCharForError, decodeDecEntity, decodeGeneralEntity, decodeHexEntity, endOfInput, feedInput, finishCData, finishComment, finishDTD, finishPI, finishSpace, handleEntityStartingToken, handleNamedEntityStartingToken, handleNumericEntityStartingToken, handlePartialCR, handleStartElement, handleStartElementStart, loadMore, needMoreInput, nextFromProlog, nextFromTree, parseEntityName, parseNewEntityName, parseNewName, parsePName, skipCData, skipComment, skipPI, skipSpace, throwInternal, toString, verifyAndAppendEntityCharacter_releaseBuffers, addUtfPName, getCurrentColumnNr, getCurrentLineNr, getCurrentLocation, markLF, markLFbindName, bindNs, checkImmutableBinding, close, decodeAttrBinaryValue, decodeAttrValue, decodeAttrValues, decodeElements, findAttrIndex, findOrCreateBinding, finishToken, fireSaxCharacterEvents, fireSaxCommentEvent, fireSaxEndElement, fireSaxPIEvent, fireSaxSpaceEvents, fireSaxStartElement, getAttrCollector, getAttrCount, getAttrLocalName, getAttrNsURI, getAttrPrefix, getAttrPrefixedName, getAttrQName, getAttrType, getAttrValue, getAttrValue, getConfig, 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, reportDoubleHyphenInComments, reportDuplicateNsDecl, reportEntityOverflow, reportEofInName, reportIllegalCDataEnd, reportIllegalNsDecl, reportIllegalNsDecl, reportInputProblem, reportInvalidNameChar, reportInvalidNsIndex, reportInvalidXmlChar, reportMissingPISpace, reportMultipleColonsInName, reportPrologProblem, reportPrologUnexpChar, reportTreeUnexpChar, reportUnboundPrefix, reportUnexpandedEntityInAttr, reportUnexpectedEndTag, resetForDecoding, skipToken, throwInvalidSpace, throwNullChar, throwUnexpectedChar, verifyXmlCharprotected boolean _inDtdDeclaration
public AsyncUtfScanner(ReaderConfig cfg)
protected final int startCharacters(byte b)
throws XMLStreamException
AsyncByteScannerXMLStreamReader.next() returns, no
blocking can occur when calling other methods.startCharacters in class AsyncByteScannerXMLStreamExceptionprotected int startCharactersPending()
throws XMLStreamException
AsyncByteScannerstartCharactersPending in class AsyncByteScannerXMLStreamExceptionprotected final void finishCharacters()
throws XMLStreamException
finishCharacters in class AsyncByteScannerXMLStreamExceptionprotected final int finishCharactersCoalescing()
throws XMLStreamException
finishCharactersCoalescing in class AsyncByteScannerXMLStreamExceptionprotected int handleEntityInCharacters()
throws XMLStreamException
NOTE: unlike with generic parsing of named entities, where trailing semicolon needs to be left in place, here we should just process it right away.
XMLStreamExceptionprotected int handleDecEntityInCharacters(int ptr)
throws XMLStreamException
XMLStreamExceptionprotected int handleHexEntityInCharacters(int ptr)
throws XMLStreamException
XMLStreamExceptionprotected boolean skipCharacters()
throws XMLStreamException
skipCharacters in class AsyncByteScannerXMLStreamExceptionprotected boolean skipCoalescedText()
throws XMLStreamException
skipCoalescedText in class XmlScannerXMLStreamExceptionprotected boolean handleAttrValue()
throws XMLStreamException
handleAttrValue in class AsyncByteScannerXMLStreamExceptionprotected int handleEntityInAttributeValue()
throws XMLStreamException
XMLStreamExceptionprotected boolean handleNsDecl()
throws XMLStreamException
handleNsDecl in class AsyncByteScannerXMLStreamExceptionprotected final boolean handleDTDInternalSubset(boolean init)
throws XMLStreamException
handleDTDInternalSubset in class AsyncByteScannerinit - Whether this is the first call (and state needs to be initialized) or notXMLStreamExceptionprotected final int parseCommentContents()
throws XMLStreamException
parseCommentContents in class AsyncByteScannerXMLStreamExceptionprotected final int handleCommentPending()
throws XMLStreamException
XMLStreamExceptionprotected final int parseCDataContents()
throws XMLStreamException
parseCDataContents in class AsyncByteScannerXMLStreamExceptionprotected final int handleCDataPending()
throws XMLStreamException
XMLStreamExceptionprotected final int parsePIData()
throws XMLStreamException
parsePIData in class AsyncByteScannerXMLStreamExceptionprotected final int handlePIPending()
throws XMLStreamException
XMLStreamExceptionprotected final int decodeUtf8_2(int c)
throws XMLStreamException
Note: caller must guarantee enough data is available before calling the method
XMLStreamExceptionprotected final void skipUtf8_2(int c)
throws XMLStreamException
XMLStreamExceptionprotected final int decodeUtf8_3(int c1)
throws XMLStreamException
Note: caller must guarantee enough data is available before calling the method
XMLStreamExceptionprotected final int decodeUtf8_3(int c1,
int c2,
int c3)
throws XMLStreamException
XMLStreamExceptionprotected final int decodeUtf8_4(int c)
throws XMLStreamException
XMLStreamExceptionprotected final int decodeUtf8_4(int c1,
int c2,
int c3,
int c4)
throws XMLStreamException
XMLStreamExceptionprotected final PName addPName(int hash, int[] quads, int qlen, int lastQuadBytes) throws XMLStreamException
addPName in class AsyncByteScannerXMLStreamExceptionprotected void reportInvalidInitial(int mask)
throws XMLStreamException
reportInvalidInitial in class ByteBasedScannerXMLStreamExceptionprotected void reportInvalidOther(int mask)
throws XMLStreamException
reportInvalidOther in class ByteBasedScannerXMLStreamExceptionprotected void reportInvalidOther(int mask,
int ptr)
throws XMLStreamException
XMLStreamExceptionCopyright © 2012-2013 FasterXML. All Rights Reserved.