Top Description Fields Constructors Methods
com.fasterxml.aalto.in

public abstract Class ByteBasedScanner

extends XmlScanner
Class Inheritance
Known Direct Subclasses
com.fasterxml.aalto.in.StreamScanner, com.fasterxml.aalto.async.AsyncByteScanner
Imports
java.io.IOException, javax.xml.stream.XMLStreamException, org.codehaus.stax2.XMLStreamLocation2, com.fasterxml.aalto.impl.LocationImpl, com.fasterxml.aalto.util.DataUtil, .XmlCharTypes, .XmlChars

Intermediate base class used by different byte-backed scanners. Specifically, used as a base by both blocking (stream) and non-blocking (async) byte-based scanners (as opposed to Reader-backed, character-based scanners)

Field Summary

Modifier and TypeField and Description
protected int
_inputEnd

Pointer to the first byte after the end of valid content.

protected int
_inputPtr

Pointer to the next unread byte in the input buffer.

protected int
_tmpChar

Storage location for a single character that can not be easily pushed back (for example, multi-byte char; or char entity expansion).

protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
protected static final byte
Inherited from com.fasterxml.aalto.in.XmlScanner:
_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_xml11CDATA_STRINT_0INT_9INT_AINT_aINT_AMPINT_APOSINT_COLONINT_CRINT_EQINT_EXCLINT_FINT_fINT_GTINT_HYPHENINT_LBRACKETINT_LFINT_LTINT_NULLINT_QMARKINT_QUOTEINT_RBRACKETINT_SLASHINT_SPACEINT_TABINT_zMAX_UNICODE_CHARTOKEN_EOI

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract void
protected final PName
addUTFPName(ByteBasedPNameTable symbols, XmlCharTypes charTypes, int hash, int[] quads, int qlen, int lastQuadBytes)

Conceptually, this method really does NOT belong here.

protected abstract 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.

public int
public XMLStreamLocation2
public long
public long
public long
public long
protected final void
markLF(int offset)

protected final void
protected void
protected void
protected final void
Inherited from com.fasterxml.aalto.in.XmlScanner:
_releaseBuffersbindNamebindNscheckImmutableBindingclosedecodeAttrBinaryValuedecodeAttrValuedecodeAttrValuesdecodeElementsfindAttrIndexfindOrCreateBindingfinishCDatafinishCharactersfinishCommentfinishDTDfinishPIfinishSpacefinishTokenfireSaxCharacterEventsfireSaxCommentEventfireSaxEndElementfireSaxPIEventfireSaxSpaceEventsfireSaxStartElementgetAttrCollectorgetAttrCountgetAttrLocalNamegetAttrNsURIgetAttrPrefixgetAttrPrefixedNamegetAttrQNamegetAttrTypegetAttrValuegetAttrValuegetConfiggetCurrentLineNrgetDepthgetDTDPublicIdgetDTDSystemIdgetEndLocationgetInputPublicIdgetInputSystemIdgetNamegetNamespacePrefixgetNamespaceURIgetNamespaceURIgetNamespaceURIgetNonTransientNamespaceContextgetNsCountgetPrefixgetPrefixesgetQNamegetStartLocationgetTextgetTextgetTextCharactersgetTextCharactersgetTextLengthhandleInvalidXmlCharhasEmptyStackisAttrSpecifiedisEmptyTagisTextWhitespaceloadMoreloadMoreGuaranteedloadMoreGuaranteednextFromProlognextFromTreereportDoubleHyphenInCommentsreportDuplicateNsDeclreportEntityOverflowreportEofInNamereportIllegalCDataEndreportIllegalNsDeclreportIllegalNsDeclreportInputProblemreportInvalidNameCharreportInvalidNsIndexreportInvalidXmlCharreportMissingPISpacereportMultipleColonsInNamereportPrologProblemreportPrologUnexpCharreportPrologUnexpElementreportTreeUnexpCharreportUnboundPrefixreportUnexpandedEntityInAttrreportUnexpectedEndTagresetForDecodingskipCDataskipCharactersskipCoalescedTextskipCommentskipPIskipSpaceskipTokenthrowInvalidSpacethrowNullCharthrowUnexpectedCharverifyXmlChar

Field Detail

_inputEndback to summary
protected int _inputEnd

Pointer to the first byte after the end of valid content. This may point beyond of the physical buffer array.

_inputPtrback to summary
protected int _inputPtr

Pointer to the next unread byte in the input buffer.

_tmpCharback to summary
protected int _tmpChar

Storage location for a single character that can not be easily pushed back (for example, multi-byte char; or char entity expansion). Negative, if from entity expansion; positive if a singular char.

BYTE_aback to summary
protected static final byte BYTE_a
BYTE_Aback to summary
protected static final byte BYTE_A
BYTE_AMPback to summary
protected static final byte BYTE_AMP
BYTE_APOSback to summary
protected static final byte BYTE_APOS
BYTE_Cback to summary
protected static final byte BYTE_C
BYTE_CRback to summary
protected static final byte BYTE_CR
BYTE_Dback to summary
protected static final byte BYTE_D
BYTE_EQback to summary
protected static final byte BYTE_EQ
BYTE_EXCLback to summary
protected static final byte BYTE_EXCL
BYTE_gback to summary
protected static final byte BYTE_g
BYTE_GTback to summary
protected static final byte BYTE_GT
BYTE_HASHback to summary
protected static final byte BYTE_HASH
BYTE_HYPHENback to summary
protected static final byte BYTE_HYPHEN
BYTE_lback to summary
protected static final byte BYTE_l
BYTE_LBRACKETback to summary
protected static final byte BYTE_LBRACKET
BYTE_LFback to summary
protected static final byte BYTE_LF
BYTE_LTback to summary
protected static final byte BYTE_LT
BYTE_mback to summary
protected static final byte BYTE_m
BYTE_NULLback to summary
protected static final byte BYTE_NULL
BYTE_oback to summary
protected static final byte BYTE_o
BYTE_pback to summary
protected static final byte BYTE_p
BYTE_Pback to summary
protected static final byte BYTE_P
BYTE_qback to summary
protected static final byte BYTE_q
BYTE_QMARKback to summary
protected static final byte BYTE_QMARK
BYTE_QUOTback to summary
protected static final byte BYTE_QUOT
BYTE_RBRACKETback to summary
protected static final byte BYTE_RBRACKET
BYTE_sback to summary
protected static final byte BYTE_s
BYTE_Sback to summary
protected static final byte BYTE_S
BYTE_SEMICOLONback to summary
protected static final byte BYTE_SEMICOLON
BYTE_SLASHback to summary
protected static final byte BYTE_SLASH
BYTE_SPACEback to summary
protected static final byte BYTE_SPACE
BYTE_tback to summary
protected static final byte BYTE_t
BYTE_Tback to summary
protected static final byte BYTE_T
BYTE_TABback to summary
protected static final byte BYTE_TAB
BYTE_uback to summary
protected static final byte BYTE_u
BYTE_xback to summary
protected static final byte BYTE_x

Constructor Detail

ByteBasedScannerback to summary
protected ByteBasedScanner(ReaderConfig cfg)

Method Detail

_closeSourceback to summary
protected abstract void _closeSource() throws IOException

Implements abstract com.fasterxml.aalto.in.XmlScanner._closeSource.

Annotations
@Override
addUTFPNameback to summary
protected final PName addUTFPName(ByteBasedPNameTable symbols, XmlCharTypes charTypes, int hash, int[] quads, int qlen, int lastQuadBytes) throws XMLStreamException

Conceptually, this method really does NOT belong here. However, currently it is quite hard to refactor it, so it'll have to stay here until better place is found

decodeCharForErrorback to summary
protected abstract int decodeCharForError(byte b) throws XMLStreamException

Method called by methods when encountering a byte that can not be part of a valid character in the current context. Should return the actual decoded character for error reporting purposes.

getCurrentColumnNrback to summary
public int getCurrentColumnNr()

Implements abstract com.fasterxml.aalto.in.XmlScanner.getCurrentColumnNr.

Annotations
@Override
getCurrentLocationback to summary
public XMLStreamLocation2 getCurrentLocation()

Implements abstract com.fasterxml.aalto.in.XmlScanner.getCurrentLocation.

Returns:XMLStreamLocation2

Doc from com.fasterxml.aalto.in.XmlScanner.getCurrentLocation.

Current input location

Annotations
@Override
getEndingByteOffsetback to summary
public long getEndingByteOffset() throws XMLStreamException

Implements abstract com.fasterxml.aalto.in.XmlScanner.getEndingByteOffset.

Annotations
@Override
getEndingCharOffsetback to summary
public long getEndingCharOffset() throws XMLStreamException

Implements abstract com.fasterxml.aalto.in.XmlScanner.getEndingCharOffset.

Annotations
@Override
getStartingByteOffsetback to summary
public long getStartingByteOffset()

Implements abstract com.fasterxml.aalto.in.XmlScanner.getStartingByteOffset.

Annotations
@Override
getStartingCharOffsetback to summary
public long getStartingCharOffset()

Implements abstract com.fasterxml.aalto.in.XmlScanner.getStartingCharOffset.

Annotations
@Override
markLFback to summary
protected final void markLF(int offset)
markLFback to summary
protected final void markLF()
reportInvalidInitialback to summary
protected void reportInvalidInitial(int mask) throws XMLStreamException
reportInvalidOtherback to summary
protected void reportInvalidOther(int mask) throws XMLStreamException
setStartLocationback to summary
protected final void setStartLocation()