public class NonBlockingByteBufferJsonParser extends NonBlockingUtf8JsonParserBase implements ByteBufferFeeder
ByteBuffer instance(s) passed.
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.
JsonParser.Feature, JsonParser.NumberType_icLatin1, _origBufferLen_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_PLUS, 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_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberFloat, _numberInt, _numberLong, _numberNegative, _numberString, _numTypesValid, _parsingContext, _streamReadConstraints, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, JSON_READ_CAPABILITIES_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_features, _requestPayload, DEFAULT_READ_CAPABILITIES| Constructor and Description |
|---|
NonBlockingByteBufferJsonParser(IOContext ctxt,
int parserFeatures,
ByteQuadsCanonicalizer sym) |
| Modifier and Type | Method and Description |
|---|---|
void |
feedInput(ByteBuffer byteBuffer)
Method that can be called to feed more data, if (and only if)
NonBlockingInputFeeder.needMoreInput() returns true. |
protected byte |
getByteFromBuffer(int ptr) |
protected byte |
getNextSignedByteFromBuffer() |
protected int |
getNextUnsignedByteFromBuffer() |
NonBlockingInputFeeder |
getNonBlockingInputFeeder()
Method that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or
null for
parsers that use blocking I/O. |
int |
releaseBuffered(OutputStream out)
Method that can be called to push back any content that
has been read but not consumed by the parser.
|
_decodeEscaped, _finishErrorToken, _finishErrorTokenWithEOF, _finishFieldWithEscape, _finishFloatExponent, _finishFloatFraction, _finishKeywordToken, _finishKeywordTokenWithEOF, _finishNonStdToken, _finishNonStdTokenWithEOF, _finishNumberIntegralPart, _finishNumberLeadingNegZeroes, _finishNumberLeadingPosNegZeroes, _finishNumberLeadingPosZeroes, _finishNumberLeadingZeroes, _finishNumberMinus, _finishNumberPlus, _finishNumberPlusMinus, _finishToken, _finishTokenWithEOF, _reportErrorToken, _startAposString, _startFalseToken, _startFloat, _startFloatThatStartsWithPeriod, _startNegativeNumber, _startNullToken, _startNumberLeadingZero, _startPositiveNumber, _startPositiveNumber, _startString, _startTrueToken, _startUnexpectedValue, endOfInput, needMoreInput, nextToken_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, getReadCapabilities, getText, getText, getTextCharacters, getTextLength, getTextOffset, getTokenLocation, getValueAsString, getValueAsString, hasTextCharacters, readBinaryValue, setCodec, symbolTableForTests_checkStdFeatureChanges, _contentReference, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _eofAsNextChar, _finishString, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _getSourceReference, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToFloat, convertNumberToInt, convertNumberToLong, createChildArrayContext, createChildObjectContext, disable, enable, getBigIntegerValue, getCurrentName, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getNumberValueDeferred, getNumberValueExact, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, isClosed, isNaN, loadMore, loadMoreGuaranteed, overrideCurrentName, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask, streamReadConstraints, version_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, hasCurrentToken, hasToken, hasTokenId, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren_codec, _constructError, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, assignCurrentValue, canReadObjectId, canReadTypeId, canUseSchema, configure, currentLocation, currentName, currentTokenLocation, currentValue, 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, setSchemaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendOfInput, needMoreInputpublic NonBlockingByteBufferJsonParser(IOContext ctxt, int parserFeatures, ByteQuadsCanonicalizer sym)
public NonBlockingInputFeeder getNonBlockingInputFeeder()
JsonParsernull for
parsers that use blocking I/O.getNonBlockingInputFeeder in class JsonParserpublic void feedInput(ByteBuffer byteBuffer) throws IOException
ByteBufferFeederNonBlockingInputFeeder.needMoreInput() returns true.feedInput in interface ByteBufferFeederbyteBuffer - Buffer that contains additional input to readIOException - 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)public int releaseBuffered(OutputStream out) throws IOException
JsonParserreleaseBuffered in class NonBlockingJsonParserBaseout - OutputStream to which buffered, undecoded content is written toOutputStream;
otherwise number of bytes released (0 if there was nothing to release)IOException - if write to stream threw exceptionprotected byte getNextSignedByteFromBuffer()
getNextSignedByteFromBuffer in class NonBlockingUtf8JsonParserBaseprotected int getNextUnsignedByteFromBuffer()
getNextUnsignedByteFromBuffer in class NonBlockingUtf8JsonParserBaseprotected byte getByteFromBuffer(int ptr)
getByteFromBuffer in class NonBlockingUtf8JsonParserBaseptr - pointer to byte that is requiredCopyright © 2008–2023 FasterXML. All rights reserved.