org.codehaus.jackson.impl
Class ReaderBasedParserBase
java.lang.Object
org.codehaus.jackson.JsonParser
org.codehaus.jackson.impl.JsonParserBase
org.codehaus.jackson.impl.JsonNumericParserBase
org.codehaus.jackson.impl.ReaderBasedParserBase
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- ReaderBasedNumericParser
public abstract class ReaderBasedParserBase
- extends JsonNumericParserBase
This is a simple low-level input reader base class, used by
JSON parser.
The reason for sub-classing (over composition)
is due to need for direct access to character buffers
and positions.
- Author:
- Tatu Saloranta
Field Summary |
protected char[] |
_inputBuffer
Current buffer from which data is read; generally data is read into
buffer from input source. |
protected Reader |
_reader
Reader that can be used for reading more content, if one
buffer from input source, but in some cases pre-loaded buffer
is handed to the parser. |
Fields inherited from class org.codehaus.jackson.impl.JsonNumericParserBase |
_numberBigDecimal, _numberBigInt, _numberDouble, _numberInt, _numberLong, _numberNegative, _numTypesValid, CHAR_NULL, INT_0, INT_1, INT_2, INT_3, INT_4, INT_5, INT_6, INT_7, INT_8, INT_9, INT_DECIMAL_POINT, INT_e, INT_E, INT_MINUS, INT_PLUS, mExpLength, mFractLength, mIntLength, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_INT, NR_LONG, NR_UNKNOWN |
Fields inherited from class org.codehaus.jackson.impl.JsonParserBase |
_binaryValue, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _inputEnd, _inputPtr, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _parsingContext, _textBuffer, _tokenIncomplete, _tokenInputCol, _tokenInputRow, _tokenInputTotal |
Methods inherited from class org.codehaus.jackson.impl.JsonNumericParserBase |
convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, getBigIntegerValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, parseNumberText, parseNumericValue, reportInvalidNumber, reportOverflowInt, reportOverflowLong, reportUnexpectedNumberChar, reset |
Methods inherited from class org.codehaus.jackson.impl.JsonParserBase |
_constructError, _decodeBase64, _finishString, _getByteArrayBuilder, _getCharDesc, _handleEOF, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportMismatchedEndMarker, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _throwUnquotedSpace, _wrapError, close, getBinaryValue, getCurrentLocation, getCurrentName, getParsingContext, getText, getTextCharacters, getTextLength, getTextOffset, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, getTokenLocation, isClosed, loadMoreGuaranteed, nextToken, skipChildren |
Methods inherited from class org.codehaus.jackson.JsonParser |
_constructError, clearCurrentToken, configure, disable, disableFeature, enable, enableFeature, getBinaryValue, getBooleanValue, getByteValue, getCodec, getCurrentToken, getEmbeddedObject, getLastClearedToken, getShortValue, hasCurrentToken, isEnabled, isFeatureEnabled, nextValue, readValueAs, readValueAs, readValueAsTree, setCodec, setFeature |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_reader
protected Reader _reader
- Reader that can be used for reading more content, if one
buffer from input source, but in some cases pre-loaded buffer
is handed to the parser.
_inputBuffer
protected char[] _inputBuffer
- Current buffer from which data is read; generally data is read into
buffer from input source.
ReaderBasedParserBase
protected ReaderBasedParserBase(IOContext ctxt,
int features,
Reader r)
loadMore
protected final boolean loadMore()
throws IOException
- Specified by:
loadMore
in class JsonParserBase
- Throws:
IOException
getNextChar
protected char getNextChar(String eofMsg)
throws IOException,
JsonParseException
- Throws:
IOException
JsonParseException
_closeInput
protected void _closeInput()
throws IOException
- Specified by:
_closeInput
in class JsonParserBase
- Throws:
IOException
_releaseBuffers
protected void _releaseBuffers()
throws IOException
- Method called to release internal buffers owned by the base
reader. This may be called along with
_closeInput()
(for
example, when explicitly closing this reader instance), or
separately (if need be).
- Overrides:
_releaseBuffers
in class JsonParserBase
- Throws:
IOException