public class RisonParser
extends com.fasterxml.jackson.core.base.ParserBase
JsonParser, which is
based on a Reader to handle low-level character
conversion tasks.| Modifier and Type | Class and Description |
|---|---|
static class |
RisonParser.Feature
Enumeration that defines all configurable features for Rison parsers.
|
| Modifier and Type | Field and Description |
|---|---|
protected char[] |
_inputBuffer
Current buffer from which data is read; generally data is read into
buffer from input source.
|
protected com.fasterxml.jackson.core.ObjectCodec |
_objectCodec |
protected java.io.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.
|
protected int |
_risonFeatures |
protected com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer |
_symbols |
protected boolean |
_tokenIncomplete
Flag that indicates that the current token has not yet
been fully processed, and needs to be finished for
some access (or skipped to obtain the next token)
|
static char |
INT_APOSTROPHE |
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberInt, _numberLong, _numberNegative, _numTypesValid, _parsingContext, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal_currToken, _lastClearedToken, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_TAB, MAX_ERROR_TOKEN_LENGTH, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MIN_INT_D, MIN_INT_L, MIN_LONG_D, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN| Constructor and Description |
|---|
RisonParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int jsonFeatures,
int risonFeatures,
java.io.Reader r,
com.fasterxml.jackson.core.ObjectCodec codec,
com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer st) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_closeInput() |
protected byte[] |
_decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
Efficient handling for incremental parsing of base64-encoded
textual content.
|
protected int |
_decodeBase64Escape2(com.fasterxml.jackson.core.Base64Variant b64variant,
char ch,
int index) |
protected char |
_decodeEscaped() |
protected void |
_finishString() |
protected void |
_finishString2() |
protected java.lang.String |
_getText2(com.fasterxml.jackson.core.JsonToken t) |
protected com.fasterxml.jackson.core.JsonToken |
_handleInvalidNumberStart(int ch,
boolean negative)
Method called if expected numeric value (due to leading sign) does not
look like a number
|
protected com.fasterxml.jackson.core.JsonToken |
_handleUnexpectedValue(int i)
Method for handling cases where first non-space character
of an expected value token is not legal for standard JSON content.
|
protected void |
_matchToken(java.lang.String matchStr,
int i)
Helper method for checking whether input matches expected token
|
protected java.lang.String |
_parseFieldName(int i) |
protected java.lang.String |
_parseUnquotedFieldName(int i)
Method called when we see non-white space character other
than double quote, when expecting a field name.
|
protected void |
_parseUnquotedString() |
protected void |
_parseUnquotedString2() |
protected void |
_releaseBuffers()
Method called to release internal buffers owned by the base
reader.
|
protected void |
_reportInvalidToken(java.lang.String matchedPart,
java.lang.String msg) |
protected void |
_skipString()
Method called to skim through rest of unparsed String value,
if it is not needed.
|
void |
close() |
byte[] |
getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) |
com.fasterxml.jackson.core.ObjectCodec |
getCodec() |
java.lang.Object |
getEmbeddedObject() |
java.lang.Object |
getInputSource() |
protected char |
getNextChar(java.lang.String eofMsg) |
java.lang.String |
getText()
Method for accessing textual representation of the current event;
if no current event (before first call to
nextToken(), or
after encountering end-of-input), returns null. |
char[] |
getTextCharacters() |
int |
getTextLength() |
int |
getTextOffset() |
protected boolean |
loadMore() |
java.lang.Boolean |
nextBooleanValue() |
int |
nextIntValue(int defaultValue) |
long |
nextLongValue(long defaultValue) |
java.lang.String |
nextTextValue() |
com.fasterxml.jackson.core.JsonToken |
nextToken() |
protected com.fasterxml.jackson.core.JsonToken |
parseNumberText(int ch)
Initial parsing method for number values.
|
int |
releaseBuffered(java.io.Writer w) |
void |
setCodec(com.fasterxml.jackson.core.ObjectCodec c) |
com.fasterxml.jackson.core.Version |
version() |
_checkStdFeatureChanges, _decodeBase64Escape, _decodeBase64Escape, _eofAsNextChar, _getByteArrayBuilder, _getSourceReference, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, disable, enable, getBigIntegerValue, getCurrentLocation, getCurrentName, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, getTokenLocation, growArrayBy, hasTextCharacters, isClosed, isNaN, loadMoreGuaranteed, overrideCurrentName, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren_codec, _constructError, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, canUseSchema, configure, currentName, finishToken, getBinaryValue, getBooleanValue, getByteValue, getFeatureMask, getFormatFeatures, getNonBlockingInputFeeder, getObjectId, getSchema, getShortValue, getText, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, nextFieldName, nextFieldName, overrideFormatFeatures, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, requiresCustomCodec, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchemapublic static final char INT_APOSTROPHE
protected java.io.Reader _reader
protected char[] _inputBuffer
protected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected final com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer _symbols
protected final int _risonFeatures
protected boolean _tokenIncomplete
public RisonParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int jsonFeatures,
int risonFeatures,
java.io.Reader r,
com.fasterxml.jackson.core.ObjectCodec codec,
com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer st)
public com.fasterxml.jackson.core.Version version()
version in interface com.fasterxml.jackson.core.Versionedversion in class com.fasterxml.jackson.core.base.ParserBasepublic com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec in class com.fasterxml.jackson.core.JsonParserpublic void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec in class com.fasterxml.jackson.core.JsonParserpublic int releaseBuffered(java.io.Writer w)
throws java.io.IOException
releaseBuffered in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptionpublic java.lang.Object getInputSource()
getInputSource in class com.fasterxml.jackson.core.JsonParserprotected boolean loadMore()
throws java.io.IOException
loadMore in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionprotected char getNextChar(java.lang.String eofMsg)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _closeInput()
throws java.io.IOException
_closeInput in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionprotected void _releaseBuffers()
throws java.io.IOException
_closeInput() (for
example, when explicitly closing this reader instance), or
separately (if need be)._releaseBuffers in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionpublic java.lang.String getText()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextToken(), or
after encountering end-of-input), returns null.
Method can be called for any event.getText in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected java.lang.String _getText2(com.fasterxml.jackson.core.JsonToken t)
public char[] getTextCharacters()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic int getTextLength()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic int getTextOffset()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic java.lang.Object getEmbeddedObject()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getEmbeddedObject in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getBinaryValue in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic com.fasterxml.jackson.core.JsonToken nextToken()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic java.lang.String nextTextValue()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextTextValue in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic int nextIntValue(int defaultValue)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextIntValue in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic long nextLongValue(long defaultValue)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextLongValue in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic java.lang.Boolean nextBooleanValue()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextBooleanValue in class com.fasterxml.jackson.core.JsonParserjava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionprotected com.fasterxml.jackson.core.JsonToken parseNumberText(int ch)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
Because much of input has to be processed in any case, no partial parsing is done: all input text will be stored for further processing. However, actual numeric value conversion will be deferred, since it is usually the most complicated and costliest part of processing.
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected com.fasterxml.jackson.core.JsonToken _handleInvalidNumberStart(int ch,
boolean negative)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected java.lang.String _parseFieldName(int i)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected java.lang.String _parseUnquotedFieldName(int i)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected com.fasterxml.jackson.core.JsonToken _handleUnexpectedValue(int i)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _parseUnquotedString()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _parseUnquotedString2()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _finishString()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
_finishString in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _finishString2()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _skipString()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected char _decodeEscaped()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
_decodeEscaped in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _matchToken(java.lang.String matchStr,
int i)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected byte[] _decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected int _decodeBase64Escape2(com.fasterxml.jackson.core.Base64Variant b64variant,
char ch,
int index)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _reportInvalidToken(java.lang.String matchedPart,
java.lang.String msg)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
java.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionCopyright © 2020. All Rights Reserved.