| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | _inputBuffer
This buffer is actually provided by caller |
| protected int | _origBufferLen
In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final byte | |
| protected final byte | |
| protected final byte | |
| protected boolean | Returns: True, if was able to skip through the space and find a non-space byte; false if reached end-of-bufferImplements abstract com. |
| protected final boolean | Returns: True if entity was decoded (and value assigned to_entityValue;
false otherwise
|
| protected final int | Returns: Character of the expanded pre-defined general entity (if name matches one); zero if not.Method that verifies that given named entity is followed by a semi-colon (meaning next byte must be available for reading); and if so, whether it is one of pre-defined general entities. |
| protected final boolean | Returns: True if entity was decoded (and value assigned to_entityValue;
false otherwise
|
| protected final int | |
| protected final int | |
| protected final int | |
| protected final int | |
| protected final int | Returns: Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
|
| public void | feedInput(byte[]
Byte array that containts data to feed: caller must ensure data remains
stable until it is fully processed (which is true when buf, int needMoreInput
returns true)Offset within array where input data to process starts start, int Length of input data within array to process. len)Implements com. needMoreInput returns true.
|
| protected final void | finishCharacters()
Implements abstract com. |
| protected final int | |
| private int | finishStartElement(boolean emptyTag)
Method called to wrap up settings when the whole start (or empty) element has been parsed. |
| private final boolean | Returns: True, if split character was completely handled; false if notMethod called to handle split multi-byte character, by decoding it and appending to the text buffer, if possible. |
| protected boolean | Returns: True, if the whole value was read; false if only part (due to buffer ending)Implements abstract com. |
| private final boolean | Returns: True if the partial information was succesfully handled; false if not
|
| private final int | |
| private int | |
| protected final int | Returns: EVENT_INCOMPLETE, if there's not enough input to handle pending char, CDATA, if we handled complete "]]>" end marker, or 0 to indicate something else was succesfully handled.
|
| private int | |
| protected final int | |
| protected int | Returns: EVENT_INCOMPLETE, if there's not enough input to handle pending char, COMMENT, if we handled complete "-->" end marker, or 0 to indicate something else was succesfully handled.
|
| private final int | |
| protected int | |
| protected final boolean | handleDTDInternalSubset(boolean init)
Implements abstract com. |
| private int | handleEndElement()
This method is "slow" version of above, used when name of the end element can split input buffer boundary |
| private int | |
| protected int | Returns: Value of expanded character entity, if processed (which must be 1 or above); 0 for general entity, or -1 for "not enough input"Method called to handle entity encountered inside attribute value. |
| protected int | Returns: Expanded (character) entity, if positive number; 0 if incomplete.Method called to handle entity encountered inside CHARACTERS segment, when trying to complete a non-coalescing text segment. |
| protected int | Returns: Type of event to returnMethod called when a new token (within tree) starts with an entity. |
| private final int | |
| protected int | |
| protected int | handleNamedEntityStartingToken()
Method called when we see an entity that is starting a new token, and part of its name has been decoded (but not all) |
| protected boolean | |
| private final boolean | Returns: True if the partial information was succesfully handled; false if not
|
| protected int | handleNumericEntityStartingToken()
Method called to handle cases where we find something other than a character entity (or one of 4 pre-defined general entities that act like character entities) |
| protected final boolean | Returns: True if the linefeed was succesfully processed (had enough input data to do that); or false if there is no data available to check thisImplements abstract com. |
| protected int | |
| protected int | Returns: EVENT_INCOMPLETE, if there's not enough input to handle pending char, PROCESSING_INSTRUCTION, if we handled complete "?>" end marker, or 0 to indicate something else was succesfully handled.
|
| protected int | handleStartElement()
Implements abstract com. |
| protected int | handleStartElementStart(byte b)
Implements abstract com. |
| private void | |
| private void | |
| public final boolean | needMoreInput()
Implements com. |
| public int | |
| protected final int | |
| protected int | |
| protected final PName | |
| protected final PName | |
| protected final PName | |
| protected int | |
| protected final PName | parsePName()
Implements abstract com. |
| protected boolean | Returns: True, if skipping ending with an unexpanded entity; false if notImplements abstract com. |
| protected boolean | skipCoalescedText()
Implements abstract com. |
| private int | Returns: Expanded (character) entity, if positive number; 0 if incomplete.Method called to handle entity encountered inside CHARACTERS segment, when trying to complete a non-coalescing text segment. |
| private final boolean | |
| protected final void | |
| protected final int | startCharacters(byte b)
Implements abstract com. |
| 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). |
| public String |
| _inputBuffer | back to summary |
|---|---|
| protected byte[] _inputBuffer This buffer is actually provided by caller | |
| _origBufferLen | back to summary |
|---|---|
| protected int _origBufferLen In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained. This is needed to correctly update location information when the block has been completed. | |
| AsyncByteArrayScanner | back to summary |
|---|---|
| public AsyncByteArrayScanner(ReaderConfig cfg) | |
| _currentByte | back to summary |
|---|---|
| protected final byte _currentByte() throws XMLStreamException Implements abstract com.
| |
| _nextByte | back to summary |
|---|---|
| protected final byte _nextByte() throws XMLStreamException Implements abstract com.
| |
| _prevByte | back to summary |
|---|---|
| protected final byte _prevByte() throws XMLStreamException Implements abstract com.
| |
| asyncSkipSpace | back to summary |
|---|---|
| protected boolean asyncSkipSpace() throws XMLStreamException Implements abstract com. Method to skip whatever space can be skipped. Note if available content ends with a CR, method will set
| |
| decodeDecEntity | back to summary |
|---|---|
protected final boolean decodeDecEntity() throws XMLStreamException
| |
| decodeGeneralEntity | back to summary |
|---|---|
| protected final int decodeGeneralEntity(PName entityName) throws XMLStreamException Method that verifies that given named entity is followed by a semi-colon (meaning next byte must be available for reading); and if so, whether it is one of pre-defined general entities.
| |
| decodeHexEntity | back to summary |
|---|---|
protected final boolean decodeHexEntity() throws XMLStreamException
| |
| decodeUtf8_2 | back to summary |
|---|---|
| protected final int decodeUtf8_2(int c) throws XMLStreamException Note caller must guarantee enough data is available before calling the method | |
| decodeUtf8_3 | back to summary |
|---|---|
| protected final int decodeUtf8_3(int c1) throws XMLStreamException Note caller must guarantee enough data is available before calling the method | |
| decodeUtf8_3 | back to summary |
|---|---|
| protected final int decodeUtf8_3(int c1, int c2, int c3) throws XMLStreamException | |
| decodeUtf8_4 | back to summary |
|---|---|
| protected final int decodeUtf8_4(int c) throws XMLStreamException | |
| decodeUtf8_4 | back to summary |
|---|---|
protected final int decodeUtf8_4(int c1, int c2, int c3, int c4) throws XMLStreamException
| |
| feedInput | back to summary |
|---|---|
| public void feedInput(byte[] buf, int start, int len) throws XMLStreamException Implements com. Doc from com. Method that can be called to feed more data, if (and only if)
| |
| finishCharacters | back to summary |
|---|---|
| protected final void finishCharacters() throws XMLStreamException Implements abstract com. 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.
| |
| finishCharactersCoalescing | back to summary |
|---|---|
| protected final int finishCharactersCoalescing() throws XMLStreamException Todo Method not yet implemented | |
| finishStartElement | back to summary |
|---|---|
| private int finishStartElement(boolean emptyTag) throws XMLStreamException Method called to wrap up settings when the whole start (or empty) element has been parsed. | |
| handleAndAppendPending | back to summary |
|---|---|
| private final boolean handleAndAppendPending() throws XMLStreamException Method called to handle split multi-byte character, by decoding it and appending to the text buffer, if possible.
| |
| handleAttrValue | back to summary |
|---|---|
| protected boolean handleAttrValue() throws XMLStreamException Implements abstract com.
| |
| handleAttrValuePending | back to summary |
|---|---|
private final boolean handleAttrValuePending() throws XMLStreamException
| |
| handleAttrValuePendingUTF8 | back to summary |
|---|---|
| private final int handleAttrValuePendingUTF8() throws XMLStreamException | |
| handleCData | back to summary |
|---|---|
| private int handleCData() throws XMLStreamException | |
| handleCDataPending | back to summary |
|---|---|
protected final int handleCDataPending() throws XMLStreamException
| |
| handleCDataStartMarker | back to summary |
|---|---|
| private int handleCDataStartMarker(byte b) throws XMLStreamException | |
| handleComment | back to summary |
|---|---|
| protected final int handleComment() throws XMLStreamException Implements abstract com.
| |
| handleCommentPending | back to summary |
|---|---|
protected int handleCommentPending() throws XMLStreamException
| |
| handleDecEntityInAttribute | back to summary |
|---|---|
| private final int handleDecEntityInAttribute(boolean starting) throws XMLStreamException | |
| handleDecEntityInCharacters | back to summary |
|---|---|
| protected int handleDecEntityInCharacters(int ptr) throws XMLStreamException | |
| handleDTDInternalSubset | back to summary |
|---|---|
| protected final boolean handleDTDInternalSubset(boolean init) throws XMLStreamException Implements abstract com.
| |
| handleEndElement | back to summary |
|---|---|
| private int handleEndElement() throws XMLStreamException This method is "slow" version of above, used when name of the end element can split input buffer boundary | |
| handleEndElementStart | back to summary |
|---|---|
| private int handleEndElementStart() throws XMLStreamException | |
| handleEntityInAttributeValue | back to summary |
|---|---|
| protected int handleEntityInAttributeValue() throws XMLStreamException Method called to handle entity encountered inside attribute value.
| |
| handleEntityInCharacters | back to summary |
|---|---|
| protected int handleEntityInCharacters() throws XMLStreamException Method called to handle entity encountered inside CHARACTERS segment, when trying to complete a non-coalescing text segment. 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.
| |
| handleEntityStartingToken | back to summary |
|---|---|
| protected int handleEntityStartingToken() throws XMLStreamException Method called when a new token (within tree) starts with an entity.
| |
| handleHexEntityInAttribute | back to summary |
|---|---|
| private final int handleHexEntityInAttribute(boolean starting) throws XMLStreamException | |
| handleHexEntityInCharacters | back to summary |
|---|---|
| protected int handleHexEntityInCharacters(int ptr) throws XMLStreamException | |
| handleNamedEntityStartingToken | back to summary |
|---|---|
| protected int handleNamedEntityStartingToken() throws XMLStreamException Method called when we see an entity that is starting a new token, and part of its name has been decoded (but not all) | |
| handleNsDecl | back to summary |
|---|---|
| protected boolean handleNsDecl() throws XMLStreamException Implements abstract com.
| |
| handleNsValuePending | back to summary |
|---|---|
private final boolean handleNsValuePending() throws XMLStreamException
| |
| handleNumericEntityStartingToken | back to summary |
|---|---|
| protected int handleNumericEntityStartingToken() throws XMLStreamException Method called to handle cases where we find something other than a character entity (or one of 4 pre-defined general entities that act like character entities) | |
| handlePartialCR | back to summary |
|---|---|
| protected final boolean handlePartialCR() Implements abstract com. Method called when there is a pending \r (from past buffer), and we need to see
| |
| handlePI | back to summary |
|---|---|
| protected int handlePI() throws XMLStreamException Implements abstract com.
| |
| handlePIPending | back to summary |
|---|---|
protected int handlePIPending() throws XMLStreamException
| |
| handleStartElement | back to summary |
|---|---|
| protected int handleStartElement() throws XMLStreamException Implements abstract com.
| |
| handleStartElementStart | back to summary |
|---|---|
| protected int handleStartElementStart(byte b) throws XMLStreamException Implements abstract com. Method called when '<' and (what appears to be) a name start character have been seen.
| |
| initAttribute | back to summary |
|---|---|
| private void initAttribute(byte quoteChar) | |
| initStartElement | back to summary |
|---|---|
| private void initStartElement(PName elemName) | |
| needMoreInput | back to summary |
|---|---|
| public final boolean needMoreInput() Implements com. Doc from com. Method called to check whether it is ok to feed more data: parser returns true if it has no more content to parse (and it is ok to feed more); otherwise false (and no data should yet be fed).
| |
| nextFromTree | back to summary |
|---|---|
| public int nextFromTree() throws XMLStreamException Implements abstract com.
| |
| parseCDataContents | back to summary |
|---|---|
| protected final int parseCDataContents() throws XMLStreamException | |
| parseCommentContents | back to summary |
|---|---|
| protected int parseCommentContents() throws XMLStreamException | |
| parseEntityName | back to summary |
|---|---|
| protected final PName parseEntityName() throws XMLStreamException | |
| parseNewEntityName | back to summary |
|---|---|
| protected final PName parseNewEntityName(byte b) throws XMLStreamException | |
| parseNewName | back to summary |
|---|---|
| protected final PName parseNewName(byte b) throws XMLStreamException Implements abstract com.
| |
| parsePIData | back to summary |
|---|---|
| protected int parsePIData() throws XMLStreamException | |
| parsePName | back to summary |
|---|---|
| protected final PName parsePName() throws XMLStreamException Implements abstract com. This method can (for now?) be shared between all Ascii-based encodings, since it only does coarse validity checking -- real checks are done in different method. Some notes about assumption implementation makes:
| |
| skipCharacters | back to summary |
|---|---|
| protected boolean skipCharacters() throws XMLStreamException Implements abstract com. Method that will be called to skip all possible characters from the input buffer, but without blocking. Partial characters are not to be handled (not pending input is to be added).
| |
| skipCoalescedText | back to summary |
|---|---|
| protected boolean skipCoalescedText() throws XMLStreamException Implements abstract com. Coalescing mode is (and will) not be implemented for non-blocking parsers, so this method should never get called.
| |
| skipEntityInCharacters | back to summary |
|---|---|
| private int skipEntityInCharacters() throws XMLStreamException Method called to handle entity encountered inside CHARACTERS segment, when trying to complete a non-coalescing text segment.
| |
| skipPending | back to summary |
|---|---|
| private final boolean skipPending() throws XMLStreamException | |
| skipUtf8_2 | back to summary |
|---|---|
| protected final void skipUtf8_2(int c) throws XMLStreamException | |
| startCharacters | back to summary |
|---|---|
| protected final int startCharacters(byte b) throws XMLStreamException Implements abstract com. Doc from com. Method called to initialize state for CHARACTERS event, after
just a single byte has been seen. What needs to be done next
depends on whether coalescing mode is set or not: if it is not
set, just a single character needs to be decoded, after which
current event will be incomplete, but defined as CHARACTERS.
In coalescing mode, the whole content must be read before
current event can be defined. The reason for difference is
that when
| |
| startCharactersPending | back to summary |
|---|---|
| protected int startCharactersPending() throws XMLStreamException This method gets called, if the first character of a CHARACTERS event could not be fully read (multi-byte, split over buffer boundary). If so, there is some pending data to be handled. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |