|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.aalto.in.XmlScanner
com.fasterxml.aalto.in.ByteBasedScanner
com.fasterxml.aalto.async.AsyncByteScanner
com.fasterxml.aalto.async.AsyncUtfScanner
public class AsyncUtfScanner
This class handles parsing of UTF-8 encoded xml streams, as well as other UTF-8 compatible (subset) encodings (specifically, Latin1 and US-Ascii).
| Field Summary |
|---|
| Fields inherited from class com.fasterxml.aalto.async.AsyncByteScanner |
|---|
_currQuad, _currQuadBytes, _inputBuffer, EVENT_INCOMPLETE, mElemAllNsBound, mElemAttrCount, mElemAttrName, mElemAttrPtr, mElemAttrQuote, mNextEvent, mOrigBufferLen, mPendingInput, mQuadCount, mState, mSurroundingEvent |
| Fields inherited from class com.fasterxml.aalto.in.ByteBasedScanner |
|---|
_inputEnd, _inputPtr, 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, mCharTypes, mPastBytes, mQuadBuffer, mRowStartOffset, mSymbols, mTmpChar |
| Fields inherited from class com.fasterxml.aalto.in.XmlScanner |
|---|
_attrCollector, _attrCount, _cfgCoalescing, _cfgLazyParsing, _config, _currElem, _currNsCount, _currRow, _currToken, _defaultNs, _depth, _entityPending, _isEmptyTag, _lastNsContext, _lastNsDecl, _nameBuffer, _publicId, _systemId, _textBuilder, _tokenIncomplete, _tokenName, _xml11, CDATA_STR, INT_A, INT_AMP, INT_APOS, INT_COLON, INT_CR, INT_EQ, INT_EXCL, INT_GT, INT_HYPHEN, INT_LBRACKET, INT_LF, INT_LT, INT_NULL, INT_QMARK, INT_QUOTE, INT_RBRACKET, INT_SLASH, INT_SPACE, INT_TAB, MAX_UNICODE_CHAR, TOKEN_EOI |
| Fields inherited from interface com.fasterxml.aalto.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 | |
|---|---|
AsyncUtfScanner(ReaderConfig cfg)
|
|
| Method Summary | |
|---|---|
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 |
handleCommentPending()
|
protected boolean |
handleNsDecl()
|
protected int |
handlePIPending()
|
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). |
| Methods inherited from class com.fasterxml.aalto.async.AsyncByteScanner |
|---|
_closeSource, addInput, decodeCharForError, finishCData, finishComment, finishDTD, finishPI, finishSpace, handleCharacterEntity, handleEntity, handleEntityStart, handleGeneralEntity, handlePartialCR, handleStartElement, handleStartElementStart, hasInput, loadMore, nextFromProlog, nextFromTree, parseEntityName, parseNewEntityName, parseNewName, parsePName, skipCData, skipComment, skipPI, skipSpace, throwInternal, toString |
| Methods inherited from class com.fasterxml.aalto.in.ByteBasedScanner |
|---|
_releaseBuffers, addUtfPName, getCurrentColumnNr, getCurrentLineNr, getCurrentLocation, markLF, markLF |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncUtfScanner(ReaderConfig cfg)
| Method Detail |
|---|
protected final int startCharacters(byte b)
throws javax.xml.stream.XMLStreamException
AsyncByteScannerXMLStreamReader.next() returns, no
blocking can occur when calling other methods.
startCharacters in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected int startCharactersPending()
throws javax.xml.stream.XMLStreamException
AsyncByteScanner
startCharactersPending in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected final void finishCharacters()
throws javax.xml.stream.XMLStreamException
finishCharacters in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected final int finishCharactersCoalescing()
throws javax.xml.stream.XMLStreamException
finishCharactersCoalescing in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected boolean skipCharacters()
throws javax.xml.stream.XMLStreamException
skipCharacters in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected boolean skipCoalescedText()
throws javax.xml.stream.XMLStreamException
skipCoalescedText in class XmlScannerjavax.xml.stream.XMLStreamException
protected boolean handleAttrValue()
throws javax.xml.stream.XMLStreamException
handleAttrValue in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected boolean handleNsDecl()
throws javax.xml.stream.XMLStreamException
handleNsDecl in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected final int parseCommentContents()
throws javax.xml.stream.XMLStreamException
parseCommentContents in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected final int handleCommentPending()
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final int parsePIData()
throws javax.xml.stream.XMLStreamException
parsePIData in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected final int handlePIPending()
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final int decodeUtf8_2(int c)
throws javax.xml.stream.XMLStreamException
Note: caller must guarantee enough data is available before calling the method
javax.xml.stream.XMLStreamException
protected final void skipUtf8_2(int c)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final int decodeUtf8_3(int c1)
throws javax.xml.stream.XMLStreamException
Note: caller must guarantee enough data is available before calling the method
javax.xml.stream.XMLStreamException
protected final int decodeUtf8_3(int c1,
int c2,
int c3)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final int decodeUtf8_4(int c)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final int decodeUtf8_4(int c1,
int c2,
int c3,
int c4)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected final PName addPName(int hash,
int[] quads,
int qlen,
int lastQuadBytes)
throws javax.xml.stream.XMLStreamException
addPName in class AsyncByteScannerjavax.xml.stream.XMLStreamException
protected void reportInvalidInitial(int mask)
throws javax.xml.stream.XMLStreamException
reportInvalidInitial in class ByteBasedScannerjavax.xml.stream.XMLStreamException
protected void reportInvalidOther(int mask)
throws javax.xml.stream.XMLStreamException
reportInvalidOther in class ByteBasedScannerjavax.xml.stream.XMLStreamException
protected void reportInvalidOther(int mask,
int ptr)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||