Class NonBlockingJsonParser
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonParser
-
- com.fasterxml.jackson.core.base.ParserMinimalBase
-
- com.fasterxml.jackson.core.base.ParserBase
-
- com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase
-
- com.fasterxml.jackson.core.json.async.NonBlockingJsonParser
-
- All Implemented Interfaces:
ByteArrayFeeder
,NonBlockingInputFeeder
,Versioned
,java.io.Closeable
,java.lang.AutoCloseable
public class NonBlockingJsonParser extends NonBlockingJsonParserBase implements ByteArrayFeeder
Non-blocking parser implementation for JSON content.NOTE: only supports parsing of UTF-8 encoded content (and 7-bit US-ASCII since it is strict subset of UTF-8): other encodings are not supported.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser
JsonParser.Feature, JsonParser.NumberType
-
-
Field Summary
Fields Modifier and Type Field Description protected static int[]
_icLatin1
private static int[]
_icUTF8
protected byte[]
_inputBuffer
This buffer is actually provided viaNonBlockingInputFeeder
protected int
_origBufferLen
In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained.private static int
FEAT_MASK_ALLOW_JAVA_COMMENTS
private static int
FEAT_MASK_ALLOW_MISSING
private static int
FEAT_MASK_ALLOW_SINGLE_QUOTES
private static int
FEAT_MASK_ALLOW_UNQUOTED_NAMES
private static int
FEAT_MASK_ALLOW_YAML_COMMENTS
private static int
FEAT_MASK_LEADING_ZEROS
private static int
FEAT_MASK_TRAILING_COMMA
-
Fields inherited from class com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase
_currBufferStart, _currInputRowAlt, _endOfInput, _majorState, _majorStateAfterValue, _minorState, _minorStateAfterSplit, _nonStdTokenType, _pending32, _pendingBytes, _quad1, _quadBuffer, _quadLength, _quoted32, _quotedDigits, _symbols, MAJOR_ARRAY_ELEMENT_FIRST, MAJOR_ARRAY_ELEMENT_NEXT, MAJOR_CLOSED, MAJOR_INITIAL, MAJOR_OBJECT_FIELD_FIRST, MAJOR_OBJECT_FIELD_NEXT, MAJOR_OBJECT_VALUE, MAJOR_ROOT, MINOR_COMMENT_C, MINOR_COMMENT_CLOSING_ASTERISK, MINOR_COMMENT_CPP, MINOR_COMMENT_LEADING_SLASH, MINOR_COMMENT_YAML, MINOR_FIELD_APOS_NAME, MINOR_FIELD_LEADING_COMMA, MINOR_FIELD_LEADING_WS, MINOR_FIELD_NAME, MINOR_FIELD_NAME_ESCAPE, MINOR_FIELD_UNQUOTED_NAME, MINOR_NUMBER_EXPONENT_DIGITS, MINOR_NUMBER_EXPONENT_MARKER, MINOR_NUMBER_FRACTION_DIGITS, MINOR_NUMBER_INTEGER_DIGITS, MINOR_NUMBER_MINUS, MINOR_NUMBER_MINUSZERO, MINOR_NUMBER_ZERO, MINOR_ROOT_BOM, MINOR_ROOT_GOT_SEPARATOR, MINOR_ROOT_NEED_SEPARATOR, MINOR_VALUE_APOS_STRING, MINOR_VALUE_EXPECTING_COLON, MINOR_VALUE_EXPECTING_COMMA, MINOR_VALUE_LEADING_WS, MINOR_VALUE_STRING, MINOR_VALUE_STRING_ESCAPE, MINOR_VALUE_STRING_UTF8_2, MINOR_VALUE_STRING_UTF8_3, MINOR_VALUE_STRING_UTF8_4, MINOR_VALUE_TOKEN_ERROR, MINOR_VALUE_TOKEN_FALSE, MINOR_VALUE_TOKEN_NON_STD, MINOR_VALUE_TOKEN_NULL, MINOR_VALUE_TOKEN_TRUE, MINOR_VALUE_WS_AFTER_COMMA, NON_STD_TOKEN_INFINITY, NON_STD_TOKEN_MINUS_INFINITY, NON_STD_TOKEN_NAN, NON_STD_TOKEN_PLUS_INFINITY, NON_STD_TOKEN_VALUES, NON_STD_TOKENS
-
Fields inherited from class com.fasterxml.jackson.core.base.ParserBase
_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
-
Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase
_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
-
Fields inherited from class com.fasterxml.jackson.core.JsonParser
_features, _requestPayload
-
-
Constructor Summary
Constructors Constructor Description NonBlockingJsonParser(IOContext ctxt, int parserFeatures, ByteQuadsCanonicalizer sym)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
_decodeCharEscape()
protected char
_decodeEscaped()
Method that sub-classes must implement to support escaped sequences in base64-encoded sections.private int
_decodeFastCharEscape()
private int
_decodeSplitEscaped(int value, int bytesRead)
private boolean
_decodeSplitMultiByte(int c, int type, boolean gotNext)
private boolean
_decodeSplitUTF8_3(int prev, int prevCount, int next)
private boolean
_decodeSplitUTF8_4(int prev, int prevCount, int next)
private int
_decodeUTF8_2(int c, int d)
private int
_decodeUTF8_3(int c, int d, int e)
private int
_decodeUTF8_4(int c, int d, int e, int f)
private java.lang.String
_fastParseName()
private JsonToken
_finishAposName(int qlen, int currQuad, int currQuadBytes)
private JsonToken
_finishAposString()
private JsonToken
_finishBOM(int bytesHandled)
private JsonToken
_finishCComment(int fromMinorState, boolean gotStar)
private JsonToken
_finishCppComment(int fromMinorState)
protected JsonToken
_finishErrorToken()
protected JsonToken
_finishErrorTokenWithEOF()
protected JsonToken
_finishFieldWithEscape()
protected JsonToken
_finishFloatExponent(boolean checkSign, int ch)
protected JsonToken
_finishFloatFraction()
private JsonToken
_finishHashComment(int fromMinorState)
protected JsonToken
_finishKeywordToken(java.lang.String expToken, int matched, JsonToken result)
protected JsonToken
_finishKeywordTokenWithEOF(java.lang.String expToken, int matched, JsonToken result)
protected JsonToken
_finishNonStdToken(int type, int matched)
protected JsonToken
_finishNonStdTokenWithEOF(int type, int matched)
protected JsonToken
_finishNumberIntegralPart(char[] outBuf, int outPtr)
protected JsonToken
_finishNumberLeadingNegZeroes()
protected JsonToken
_finishNumberLeadingZeroes()
protected JsonToken
_finishNumberMinus(int ch)
private JsonToken
_finishRegularString()
protected JsonToken
_finishToken()
Method called when decoding of a token has been started, but not yet completed due to missing input; method is to continue decoding due to at least one more byte being made available to decode.protected JsonToken
_finishTokenWithEOF()
Method similar to_finishToken()
, but called when no more input is available, and end-of-input has been detected.private JsonToken
_finishUnquotedName(int qlen, int currQuad, int currQuadBytes)
Parsing of optionally supported non-standard "unquoted" names: names without either double-quotes or apostrophes surrounding them.private JsonToken
_handleOddName(int ch)
Method called when we see non-white space character other than double quote, when expecting a field name.private JsonToken
_parseEscapedName(int qlen, int currQuad, int currQuadBytes)
Slower parsing method which is generally branched to when an escape sequence is detected (or alternatively for long names, one crossing input buffer boundary).private java.lang.String
_parseMediumName(int ptr, int q2)
private java.lang.String
_parseMediumName2(int ptr, int q3, int q2)
protected JsonToken
_reportErrorToken(java.lang.String actualToken)
private int
_skipWS(int ch)
private JsonToken
_startAfterComment(int fromMinorState)
protected JsonToken
_startAposString()
private JsonToken
_startDocument(int ch)
protected JsonToken
_startFalseToken()
private JsonToken
_startFieldName(int ch)
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.private JsonToken
_startFieldNameAfterComma(int ch)
protected JsonToken
_startFloat(char[] outBuf, int outPtr, int ch)
protected JsonToken
_startFloatThatStartsWithPeriod()
protected JsonToken
_startNegativeNumber()
protected JsonToken
_startNullToken()
protected JsonToken
_startNumberLeadingZero()
protected JsonToken
_startPositiveNumber(int ch)
private JsonToken
_startSlashComment(int fromMinorState)
protected JsonToken
_startString()
protected JsonToken
_startTrueToken()
protected JsonToken
_startUnexpectedValue(boolean leadingComma, int ch)
private JsonToken
_startValue(int ch)
Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer.private JsonToken
_startValueAfterComma(int ch)
private JsonToken
_startValueExpectColon(int ch)
Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer.private JsonToken
_startValueExpectComma(int ch)
Helper method called to parse token that is either a value token in array or end-array markervoid
endOfInput()
Method that should be called after last chunk of data to parse has been fed (withfeedInput
in sub-class); can be called regardless of whatNonBlockingInputFeeder.needMoreInput()
returns.void
feedInput(byte[] buf, int start, int end)
Method that can be called to feed more data, if (and only if)NonBlockingInputFeeder.needMoreInput()
returns true.ByteArrayFeeder
getNonBlockingInputFeeder()
Method that will either return a feeder instance (if parser uses non-blocking, aka asynchronous access); ornull
for parsers that use blocking I/O.boolean
needMoreInput()
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).JsonToken
nextToken()
Main iteration method, which will advance stream enough to determine type of the next token, if any.int
releaseBuffered(java.io.OutputStream out)
Method that can be called to push back any content that has been read but not consumed by the parser.-
Methods inherited from class com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase
_addName, _closeArrayScope, _closeInput, _closeObjectScope, _eofAsNextToken, _fieldComplete, _findName, _findName, _findName, _getText2, _nonStdToken, _padLastQuad, _releaseBuffers, _reportInvalidChar, _reportInvalidInitial, _reportInvalidOther, _reportInvalidOther, _startArrayScope, _startObjectScope, _updateTokenLocation, _valueComplete, _valueCompleteInt, _valueNonStdNumberComplete, canParseAsync, getBinaryValue, getCodec, getCurrentLocation, getEmbeddedObject, getInputSource, getText, getText, getTextCharacters, getTextLength, getTextOffset, getTokenLocation, getValueAsString, getValueAsString, hasTextCharacters, readBinaryValue, setCodec, symbolTableForTests
-
Methods inherited from class com.fasterxml.jackson.core.base.ParserBase
_checkStdFeatureChanges, _decodeBase64Escape, _decodeBase64Escape, _eofAsNextChar, _finishString, _getByteArrayBuilder, _getSourceReference, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, disable, enable, getBigIntegerValue, getCurrentName, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, isClosed, isNaN, loadMore, loadMoreGuaranteed, overrideCurrentName, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask, version
-
Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase
_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, hasCurrentToken, hasToken, hasTokenId, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren
-
Methods inherited from class com.fasterxml.jackson.core.JsonParser
_codec, _constructError, _reportUnsupportedOperation, canReadObjectId, canReadTypeId, canUseSchema, configure, currentName, finishToken, getBinaryValue, getBooleanValue, getByteValue, getFeatureMask, getFormatFeatures, getObjectId, getSchema, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, nextTextValue, overrideFormatFeatures, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, requiresCustomCodec, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchema
-
-
-
-
Field Detail
-
FEAT_MASK_TRAILING_COMMA
private static final int FEAT_MASK_TRAILING_COMMA
-
FEAT_MASK_LEADING_ZEROS
private static final int FEAT_MASK_LEADING_ZEROS
-
FEAT_MASK_ALLOW_MISSING
private static final int FEAT_MASK_ALLOW_MISSING
-
FEAT_MASK_ALLOW_SINGLE_QUOTES
private static final int FEAT_MASK_ALLOW_SINGLE_QUOTES
-
FEAT_MASK_ALLOW_UNQUOTED_NAMES
private static final int FEAT_MASK_ALLOW_UNQUOTED_NAMES
-
FEAT_MASK_ALLOW_JAVA_COMMENTS
private static final int FEAT_MASK_ALLOW_JAVA_COMMENTS
-
FEAT_MASK_ALLOW_YAML_COMMENTS
private static final int FEAT_MASK_ALLOW_YAML_COMMENTS
-
_icUTF8
private static final int[] _icUTF8
-
_icLatin1
protected static final int[] _icLatin1
-
_inputBuffer
protected byte[] _inputBuffer
This buffer is actually provided viaNonBlockingInputFeeder
-
_origBufferLen
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.
-
-
Constructor Detail
-
NonBlockingJsonParser
public NonBlockingJsonParser(IOContext ctxt, int parserFeatures, ByteQuadsCanonicalizer sym)
-
-
Method Detail
-
getNonBlockingInputFeeder
public ByteArrayFeeder getNonBlockingInputFeeder()
Description copied from class:JsonParser
Method that will either return a feeder instance (if parser uses non-blocking, aka asynchronous access); ornull
for parsers that use blocking I/O.- Overrides:
getNonBlockingInputFeeder
in classJsonParser
-
needMoreInput
public final boolean needMoreInput()
Description copied from interface:NonBlockingInputFeeder
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).- Specified by:
needMoreInput
in interfaceNonBlockingInputFeeder
-
feedInput
public void feedInput(byte[] buf, int start, int end) throws java.io.IOException
Description copied from interface:ByteArrayFeeder
Method that can be called to feed more data, if (and only if)NonBlockingInputFeeder.needMoreInput()
returns true.- Specified by:
feedInput
in interfaceByteArrayFeeder
- Parameters:
buf
- Byte array that contains data to feed: caller must ensure data remains stable until it is fully processed (which is true whenNonBlockingInputFeeder.needMoreInput()
returns true)start
- Offset within array where input data to process startsend
- Offset after last byte contained in the input array- Throws:
java.io.IOException
- if the state is such that this method should not be called (has not yet consumed existing input data, or has been marked as closed)
-
endOfInput
public void endOfInput()
Description copied from interface:NonBlockingInputFeeder
Method that should be called after last chunk of data to parse has been fed (withfeedInput
in sub-class); can be called regardless of whatNonBlockingInputFeeder.needMoreInput()
returns. After calling this method, no more data can be fed; and parser assumes no more data will be available.- Specified by:
endOfInput
in interfaceNonBlockingInputFeeder
-
releaseBuffered
public int releaseBuffered(java.io.OutputStream out) throws java.io.IOException
Description copied from class:JsonParser
Method that can be called to push back any content that has been read but not consumed by the parser. This is usually done after reading all content of interest using parser. Content is released by writing it to given stream if possible; if underlying input is byte-based it can released, if not (char-based) it can not.- Specified by:
releaseBuffered
in classNonBlockingJsonParserBase
- Returns:
- -1 if the underlying content source is not byte based
(that is, input can not be sent to
OutputStream
; otherwise number of bytes released (0 if there was nothing to release) - Throws:
java.io.IOException
- if write to stream threw exception
-
_decodeEscaped
protected char _decodeEscaped() throws java.io.IOException
Description copied from class:ParserBase
Method that sub-classes must implement to support escaped sequences in base64-encoded sections. Sub-classes that do not need base64 support can leave this as is- Overrides:
_decodeEscaped
in classParserBase
- Throws:
java.io.IOException
-
nextToken
public JsonToken nextToken() throws java.io.IOException
Description copied from class:JsonParser
Main iteration method, which will advance stream enough to determine type of the next token, if any. If none remaining (stream has no content other than possible white space before ending), null will be returned.- Specified by:
nextToken
in classParserMinimalBase
- Returns:
- Next token from the stream, if any found, or null to indicate end-of-input
- Throws:
java.io.IOException
-
_finishToken
protected final JsonToken _finishToken() throws java.io.IOException
Method called when decoding of a token has been started, but not yet completed due to missing input; method is to continue decoding due to at least one more byte being made available to decode.- Throws:
java.io.IOException
-
_finishTokenWithEOF
protected final JsonToken _finishTokenWithEOF() throws java.io.IOException
Method similar to_finishToken()
, but called when no more input is available, and end-of-input has been detected. This is usually problem case, but not always: root-level values may be properly terminated by this, and similarly trailing white-space may have been skipped.- Throws:
java.io.IOException
-
_startDocument
private final JsonToken _startDocument(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishBOM
private final JsonToken _finishBOM(int bytesHandled) throws java.io.IOException
- Throws:
java.io.IOException
-
_startFieldName
private final JsonToken _startFieldName(int ch) throws java.io.IOException
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.- Throws:
java.io.IOException
-
_startFieldNameAfterComma
private final JsonToken _startFieldNameAfterComma(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_startValue
private final JsonToken _startValue(int ch) throws java.io.IOException
Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer. Value may be preceded by leading white-space, but no separator (comma).- Throws:
java.io.IOException
-
_startValueExpectComma
private final JsonToken _startValueExpectComma(int ch) throws java.io.IOException
Helper method called to parse token that is either a value token in array or end-array marker- Throws:
java.io.IOException
-
_startValueExpectColon
private final JsonToken _startValueExpectColon(int ch) throws java.io.IOException
Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer. Value MUST be preceded by a semi-colon (which may be surrounded by white-space)- Throws:
java.io.IOException
-
_startValueAfterComma
private final JsonToken _startValueAfterComma(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_startUnexpectedValue
protected JsonToken _startUnexpectedValue(boolean leadingComma, int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_skipWS
private final int _skipWS(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_startSlashComment
private final JsonToken _startSlashComment(int fromMinorState) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishHashComment
private final JsonToken _finishHashComment(int fromMinorState) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishCppComment
private final JsonToken _finishCppComment(int fromMinorState) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishCComment
private final JsonToken _finishCComment(int fromMinorState, boolean gotStar) throws java.io.IOException
- Throws:
java.io.IOException
-
_startAfterComment
private final JsonToken _startAfterComment(int fromMinorState) throws java.io.IOException
- Throws:
java.io.IOException
-
_startFalseToken
protected JsonToken _startFalseToken() throws java.io.IOException
- Throws:
java.io.IOException
-
_startTrueToken
protected JsonToken _startTrueToken() throws java.io.IOException
- Throws:
java.io.IOException
-
_startNullToken
protected JsonToken _startNullToken() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishKeywordToken
protected JsonToken _finishKeywordToken(java.lang.String expToken, int matched, JsonToken result) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishKeywordTokenWithEOF
protected JsonToken _finishKeywordTokenWithEOF(java.lang.String expToken, int matched, JsonToken result) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNonStdToken
protected JsonToken _finishNonStdToken(int type, int matched) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNonStdTokenWithEOF
protected JsonToken _finishNonStdTokenWithEOF(int type, int matched) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishErrorToken
protected JsonToken _finishErrorToken() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishErrorTokenWithEOF
protected JsonToken _finishErrorTokenWithEOF() throws java.io.IOException
- Throws:
java.io.IOException
-
_reportErrorToken
protected JsonToken _reportErrorToken(java.lang.String actualToken) throws java.io.IOException
- Throws:
java.io.IOException
-
_startFloatThatStartsWithPeriod
protected JsonToken _startFloatThatStartsWithPeriod() throws java.io.IOException
- Throws:
java.io.IOException
-
_startPositiveNumber
protected JsonToken _startPositiveNumber(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_startNegativeNumber
protected JsonToken _startNegativeNumber() throws java.io.IOException
- Throws:
java.io.IOException
-
_startNumberLeadingZero
protected JsonToken _startNumberLeadingZero() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNumberMinus
protected JsonToken _finishNumberMinus(int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNumberLeadingZeroes
protected JsonToken _finishNumberLeadingZeroes() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNumberLeadingNegZeroes
protected JsonToken _finishNumberLeadingNegZeroes() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishNumberIntegralPart
protected JsonToken _finishNumberIntegralPart(char[] outBuf, int outPtr) throws java.io.IOException
- Throws:
java.io.IOException
-
_startFloat
protected JsonToken _startFloat(char[] outBuf, int outPtr, int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishFloatFraction
protected JsonToken _finishFloatFraction() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishFloatExponent
protected JsonToken _finishFloatExponent(boolean checkSign, int ch) throws java.io.IOException
- Throws:
java.io.IOException
-
_fastParseName
private final java.lang.String _fastParseName() throws java.io.IOException
- Throws:
java.io.IOException
-
_parseMediumName
private final java.lang.String _parseMediumName(int ptr, int q2) throws java.io.IOException
- Throws:
java.io.IOException
-
_parseMediumName2
private final java.lang.String _parseMediumName2(int ptr, int q3, int q2) throws java.io.IOException
- Throws:
java.io.IOException
-
_parseEscapedName
private final JsonToken _parseEscapedName(int qlen, int currQuad, int currQuadBytes) throws java.io.IOException
Slower parsing method which is generally branched to when an escape sequence is detected (or alternatively for long names, one crossing input buffer boundary). Needs to be able to handle more exceptional cases, gets slower, and hence is offlined to a separate method.- Throws:
java.io.IOException
-
_handleOddName
private JsonToken _handleOddName(int ch) throws java.io.IOException
Method called when we see non-white space character other than double quote, when expecting a field name. In standard mode will just throw an exception; but in non-standard modes may be able to parse name.- Throws:
java.io.IOException
-
_finishUnquotedName
private JsonToken _finishUnquotedName(int qlen, int currQuad, int currQuadBytes) throws java.io.IOException
Parsing of optionally supported non-standard "unquoted" names: names without either double-quotes or apostrophes surrounding them. Unlike other- Throws:
java.io.IOException
-
_finishAposName
private JsonToken _finishAposName(int qlen, int currQuad, int currQuadBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
_finishFieldWithEscape
protected final JsonToken _finishFieldWithEscape() throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeSplitEscaped
private int _decodeSplitEscaped(int value, int bytesRead) throws java.io.IOException
- Throws:
java.io.IOException
-
_startString
protected JsonToken _startString() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishRegularString
private final JsonToken _finishRegularString() throws java.io.IOException
- Throws:
java.io.IOException
-
_startAposString
protected JsonToken _startAposString() throws java.io.IOException
- Throws:
java.io.IOException
-
_finishAposString
private final JsonToken _finishAposString() throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeSplitMultiByte
private final boolean _decodeSplitMultiByte(int c, int type, boolean gotNext) throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeSplitUTF8_3
private final boolean _decodeSplitUTF8_3(int prev, int prevCount, int next) throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeSplitUTF8_4
private final boolean _decodeSplitUTF8_4(int prev, int prevCount, int next) throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeCharEscape
private final int _decodeCharEscape() throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeFastCharEscape
private final int _decodeFastCharEscape() throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeUTF8_2
private final int _decodeUTF8_2(int c, int d) throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeUTF8_3
private final int _decodeUTF8_3(int c, int d, int e) throws java.io.IOException
- Throws:
java.io.IOException
-
_decodeUTF8_4
private final int _decodeUTF8_4(int c, int d, int e, int f) throws java.io.IOException
- Throws:
java.io.IOException
-
-