public final class Utf8Scanner extends StreamScanner
_charTypes, _in, _inputBuffer, _quadBuffer, _symbols
_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
Constructor and Description |
---|
Utf8Scanner(ReaderConfig cfg,
InputStream in,
byte[] buffer,
int ptr,
int last) |
Modifier and Type | Method and Description |
---|---|
int |
decodeCharForError(byte b)
Method called called to decode a full UTF-8 characters, given
its first byte.
|
protected void |
finishCData() |
protected void |
finishCharacters() |
protected void |
finishCoalescedCData() |
protected void |
finishCoalescedCharacters() |
protected void |
finishCoalescedText()
Method that gets called after a primary text segment (of type
CHARACTERS or CDATA, not applicable to SPACE) has been read in
text buffer.
|
protected void |
finishComment() |
protected void |
finishDTD(boolean copyContents)
When this method gets called we know that we have an internal subset,
and that the opening '[' has already been read.
|
protected void |
finishPI() |
protected void |
finishSpace()
Note: this method is only called in cases where it is known
that only space chars are legal.
|
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 int |
handleEntityInText(boolean inAttr)
Method called when an ampersand is encounter in text segment.
|
protected int |
handleStartElement(byte b)
Parsing of start element requires parsing of the element name
(and attribute names), and is thus encoding-specific.
|
protected String |
parsePublicId(byte quoteChar)
Parsing of public ids is bit more complicated than that of system
ids, since white space is to be coalesced.
|
protected String |
parseSystemId(byte quoteChar) |
protected void |
reportInvalidOther(int mask,
int ptr) |
protected void |
skipCData() |
protected boolean |
skipCharacters() |
protected boolean |
skipCoalescedText()
Method that gets called after a primary text segment (of type
CHARACTERS or CDATA, not applicable to SPACE) has been skipped.
|
protected void |
skipComment() |
protected void |
skipPI() |
protected void |
skipSpace() |
_closeSource, _nextEntity, _releaseBuffers, addPName, checkInTreeIndentation, checkPrologIndentation, handleCharEntity, handleEndElement, loadAndRetain, loadMore, loadOne, loadOne, nextByte, nextByte, nextFromProlog, nextFromTree, parsePName, parsePNameLong, parsePNameMedium, parsePNameSlow, skipInternalWs
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, reportDoubleHyphenInComments, reportDuplicateNsDecl, reportEntityOverflow, reportEofInName, reportIllegalCDataEnd, reportIllegalNsDecl, reportIllegalNsDecl, reportInputProblem, reportInvalidNameChar, reportInvalidNsIndex, reportInvalidXmlChar, reportMissingPISpace, reportMultipleColonsInName, reportPrologProblem, reportPrologUnexpChar, reportPrologUnexpElement, reportTreeUnexpChar, reportUnboundPrefix, reportUnexpandedEntityInAttr, reportUnexpectedEndTag, resetForDecoding, skipToken, throwInvalidSpace, throwNullChar, throwUnexpectedChar, verifyXmlChar
public Utf8Scanner(ReaderConfig cfg, InputStream in, byte[] buffer, int ptr, int last)
protected final void finishToken() throws XMLStreamException
XmlScanner
finishToken
in class XmlScanner
XMLStreamException
protected int handleStartElement(byte b) throws XMLStreamException
StreamScanner
handleStartElement
in class StreamScanner
XMLStreamException
protected final int handleEntityInText(boolean inAttr) throws XMLStreamException
handleEntityInText
in class StreamScanner
inAttr
- True, if reference is from attribute value; false
if from normal text contentXMLStreamException
protected String parsePublicId(byte quoteChar) throws XMLStreamException
parsePublicId
in class StreamScanner
XMLStreamException
protected String parseSystemId(byte quoteChar) throws XMLStreamException
parseSystemId
in class StreamScanner
XMLStreamException
protected final boolean skipCharacters() throws XMLStreamException
skipCharacters
in class XmlScanner
XMLStreamException
protected final void skipComment() throws XMLStreamException
skipComment
in class XmlScanner
XMLStreamException
protected final void skipCData() throws XMLStreamException
skipCData
in class XmlScanner
XMLStreamException
protected final void skipPI() throws XMLStreamException
skipPI
in class XmlScanner
XMLStreamException
protected final void skipSpace() throws XMLStreamException
skipSpace
in class XmlScanner
XMLStreamException
protected final void finishCData() throws XMLStreamException
finishCData
in class XmlScanner
XMLStreamException
protected final void finishCharacters() throws XMLStreamException
finishCharacters
in class XmlScanner
XMLStreamException
protected final void finishComment() throws XMLStreamException
finishComment
in class XmlScanner
XMLStreamException
protected final void finishDTD(boolean copyContents) throws XMLStreamException
finishDTD
in class XmlScanner
XMLStreamException
protected final void finishPI() throws XMLStreamException
finishPI
in class XmlScanner
XMLStreamException
protected final void finishSpace() throws XMLStreamException
finishSpace
in class XmlScanner
XMLStreamException
protected final void finishCoalescedText() throws XMLStreamException
XMLStreamException
protected final void finishCoalescedCharacters() throws XMLStreamException
XMLStreamException
protected final void finishCoalescedCData() throws XMLStreamException
XMLStreamException
protected final boolean skipCoalescedText() throws XMLStreamException
skipCoalescedText
in class XmlScanner
XMLStreamException
public int decodeCharForError(byte b) throws XMLStreamException
decodeCharForError
in class ByteBasedScanner
XMLStreamException
protected void reportInvalidOther(int mask, int ptr) throws XMLStreamException
XMLStreamException
Copyright © 2019 FasterXML. All rights reserved.