- All Implemented Interfaces:
Closeable,AutoCloseable,Versioned
- Direct Known Subclasses:
JsonParserBase
JsonParser
implementations. Contains most common things that are independent
of actual underlying input source.-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.core.JsonParser
JsonParser.NumberType, JsonParser.NumberTypeFP -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]We will hold on to decoded binary data, for duration of current event, so that multiple calls togetBinaryValue(tools.jackson.core.Base64Variant)will not need to decode data more than once.protected ByteArrayBuilderByteArrayBuilder is needed if 'getBinaryValue' is called.protected longNumber of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer).protected intCurrent row location of current point in input buffer, starting from 1, if available.protected intCurrent index of the first character of the current row in input buffer.protected intLength of the exponent part of the number, if any, not including 'e' marker or sign, just digits.protected intLength of the fractional part (not including decimal point or exponent), in characters.protected intIndex of character after last available one in the buffer.protected intPointer to next available character in bufferprotected intLength of integer part of the number, in charactersprotected BigDecimalprotected BigIntegerprotected doubleprotected floatprotected intprotected booleanMarker for explicit "Not a Number" (NaN) values that may be read by some formats: this includes positive and negative infinity, as well as "NaN" result for some arithmetic operations.protected longprotected booleanFlag that indicates whether numeric value has a negative value.protected StringTextual number representation captured from input in cases lazy-parsing is desired.protected intBitfield that indicates which numeric representations have been calculated for the current typeprotected final TextBufferBuffer that contains contents of String values, including property names if necessary (name split across boundary, contains escape sequence, or access needed to char array)protected intColumn on input row that current token starts; 0-based (although in the end it'll be converted to 1-based)protected intInput row on which current token starts, 1-basedprotected longTotal number of bytes/characters read before start of current token.Fields inherited from class tools.jackson.core.base.ParserMinimalBase
_closed, _currToken, _ioContext, _lastClearedToken, _objectReadContext, _streamReadConstraints, _streamReadFeatures, _tokenCount, _trackMaxTokenCount, 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_RS, INT_SLASH, INT_SPACE, INT_TAB, MAX_BYTE_I, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MAX_SHORT_I, MIN_BYTE_I, MIN_INT_D, MIN_INT_L, MIN_LONG_D, MIN_SHORT_I, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN, STREAM_READ_FEATURE_DEFAULTSFields inherited from class tools.jackson.core.JsonParser
DEFAULT_READ_CAPABILITIES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParserBase(ObjectReadContext readCtxt, IOContext ctxt, int streamReadFeatures) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentReferenceHelper method used to encapsulate logic of including (or not) of "content reference" when constructingTokenStreamLocationinstances.protected ContentReferenceHelper method used to encapsulate logic of providing "content reference" when constructingTokenStreamLocationinstances and source information is NOT to be included (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATIONdisabled).protected BigIntegerprotected final int_decodeBase64Escape(Base64Variant b64variant, char ch, int index) protected final int_decodeBase64Escape(Base64Variant b64variant, int ch, int index) protected charMethod that sub-classes must implement to support escaped sequences in base64-encoded sections.protected final intprotected BigDecimalInternal accessor that needs to be used for accessing number value of typeBigDecimalwhich -- as of 2.14 -- is typically lazily parsed.protected BigIntegerInternal accessor that needs to be used for accessing number value of typeBigIntegerwhich -- as of 2.14 -- is typically lazily parsed.protected ByteArrayBuilderprotected doubleInternal accessor that needs to be used for accessing number value of typedoublewhich will be lazily parsed.protected floatInternal accessor that needs to be used for accessing number value of typefloatwhich will be lazily parsed.protected int[]_growNameDecodeBuffer(int[] arr, int more) protected <T> T_handleBase64MissingPadding(Base64Variant b64variant) protected voidMethod called when an EOF is encountered between tokens.protected abstract intprotected abstract void_parseNumericValue(int expType) Method that will parse actual numeric value out of a syntactically valid number value.protected voidMethod called to release internal buffers owned by the base reader.protected <T> T_reportInvalidBase64Char(Base64Variant b64variant, int ch, int bindex) protected <T> T_reportInvalidBase64Char(Base64Variant b64variant, int ch, int bindex, String msg) voidHelper method, usually equivalent to:getParsingContext().assignCurrentValue(v);voidclose()Method that can be called to get the name associated with the current event.protected voidprotected voidprotected voidprotected voidprotected voidprotected voidHelper method, usually equivalent to:getParsingContext().currentValue();Numeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it cannot be used as a Java long primitive type due to its magnitude.byte[]getBinaryValue(Base64Variant variant) Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value.Numeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATorJsonToken.VALUE_NUMBER_INT.doubleNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATand it can be expressed as a Java double primitive type.floatNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATand it can be expressed as a Java float primitive type.intNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it can be expressed as a value of Java int primitive type.longNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it can be expressed as a Java long primitive type.If current token is of typeJsonToken.VALUE_NUMBER_INTorJsonToken.VALUE_NUMBER_FLOAT, returns one ofJsonParser.NumberTypeconstants; otherwise returns null.Generic number value accessor method that will work for all kinds of numeric values.Method similar toJsonParser.getNumberValue()but that returns either sameNumbervalue asJsonParser.getNumberValue()(if already decoded), orStringrepresentation of as-of-yet undecoded number.Method similar toJsonParser.getNumberValue()with the difference that for floating-point numbers value returned may beBigDecimalif the underlying format does not store floating-point numbers using native representation: for example, textual formats represent numbers as Strings (which are 10-based), and conversion toDoubleis potentially lossy operation.longintintprotected static int[]growArrayBy(int[] arr, int more) booleanMethod that can be used to determine whether calling ofJsonParser.getStringCharacters()would be the most efficient way to access String value for the event parser currently points to (compared toJsonParser.getString()).booleanisNaN()Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!).protected final JsonTokenreset(boolean negative, int intLen, int fractLen, int expLen) protected final JsonTokenresetAsNaN(String valueStr, double value) protected final JsonTokenresetFloat(boolean negative, int intLen, int fractLen, int expLen) protected final JsonTokenresetInt(boolean negative, int intLen) Methods inherited from class tools.jackson.core.base.ParserMinimalBase
_closeInput, _constructInputCoercion, _constructNotNumericType, _currentLocationMinusOne, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _nullSafeUpdateToken, _reportBadInputStream, _reportBadReader, _reportError, _reportError, _reportError, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidNumber, _reportInvalidSpace, _reportMissingRootWS, _reportOverflowByte, _reportOverflowInt, _reportOverflowInt, _reportOverflowInt, _reportOverflowLong, _reportOverflowLong, _reportOverflowLong, _reportOverflowShort, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _updateToken, _updateTokenToNA, _updateTokenToNull, _wrapIOFailure, clearCurrentToken, currentNameMatch, currentToken, currentTokenCount, currentTokenId, finishToken, getBooleanValue, getByteValue, getEmbeddedObject, getLastClearedToken, getNumberTypeFP, getShortValue, getString, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isClosed, isEnabled, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextName, nextName, nextNameMatch, nextValue, objectReadContext, readValueAs, readValueAs, readValueAs, readValueAsTree, skipChildren, streamReadCapabilities, streamReadConstraints, streamReadFeaturesMethods inherited from class tools.jackson.core.JsonParser
_constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, currentLocation, currentName, currentTokenLocation, getBinaryValue, getObjectId, getSchema, getString, getStringCharacters, getStringLength, getStringOffset, getText, getTextCharacters, getTextLength, getTextOffset, getTypeId, getValueAsBoolean, getValueAsDouble, nextBooleanValue, nextIntValue, nextLongValue, nextStringValue, nextToken, nonBlockingInputFeeder, readBinaryValue, readBinaryValue, releaseBuffered, releaseBuffered, streamReadContext, streamReadInputSource, version
-
Field Details
-
_inputPtr
protected int _inputPtrPointer to next available character in buffer -
_inputEnd
protected int _inputEndIndex of character after last available one in the buffer. -
_currInputProcessed
protected long _currInputProcessedNumber of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer). -
_currInputRow
protected int _currInputRowCurrent row location of current point in input buffer, starting from 1, if available. -
_currInputRowStart
protected int _currInputRowStartCurrent index of the first character of the current row in input buffer. Needed to calculate column position, if necessary; benefit of not having column itself is that this only has to be updated once per line. -
_tokenInputTotal
protected long _tokenInputTotalTotal number of bytes/characters read before start of current token. For big (gigabyte-sized) sizes are possible, needs to be long, unlike pointers and sizes related to in-memory buffers. -
_tokenInputRow
protected int _tokenInputRowInput row on which current token starts, 1-based -
_tokenInputCol
protected int _tokenInputColColumn on input row that current token starts; 0-based (although in the end it'll be converted to 1-based) -
_textBuffer
Buffer that contains contents of String values, including property names if necessary (name split across boundary, contains escape sequence, or access needed to char array) -
_byteArrayBuilder
ByteArrayBuilder is needed if 'getBinaryValue' is called. If so, we better reuse it for remainder of content. -
_binaryValue
protected byte[] _binaryValueWe will hold on to decoded binary data, for duration of current event, so that multiple calls togetBinaryValue(tools.jackson.core.Base64Variant)will not need to decode data more than once. -
_numTypesValid
protected int _numTypesValidBitfield that indicates which numeric representations have been calculated for the current type -
_numberInt
protected int _numberInt -
_numberLong
protected long _numberLong -
_numberFloat
protected float _numberFloat -
_numberDouble
protected double _numberDouble -
_numberBigInt
-
_numberBigDecimal
-
_numberString
Textual number representation captured from input in cases lazy-parsing is desired. -
_numberIsNaN
protected boolean _numberIsNaNMarker for explicit "Not a Number" (NaN) values that may be read by some formats: this includes positive and negative infinity, as well as "NaN" result for some arithmetic operations.In case of JSON, such values can only be handled with non-standard processing: for some other formats they can be passed normally.
NOTE: this marker is NOT set in case of value overflow/underflow for
doubleorfloatvalues.- Since:
- 2.17
-
_numberNegative
protected boolean _numberNegativeFlag that indicates whether numeric value has a negative value. That is, whether its textual representation starts with minus character. -
_intLength
protected int _intLengthLength of integer part of the number, in characters -
_fractLength
protected int _fractLengthLength of the fractional part (not including decimal point or exponent), in characters. Not used for pure integer values. -
_expLength
protected int _expLengthLength of the exponent part of the number, if any, not including 'e' marker or sign, just digits. Not used for pure integer values.
-
-
Constructor Details
-
ParserBase
-
-
Method Details
-
assignCurrentValue
Description copied from class:JsonParserHelper method, usually equivalent to:getParsingContext().assignCurrentValue(v);- Specified by:
assignCurrentValuein classJsonParser- Parameters:
v- "Current value" to assign to the current input context of this parser
-
currentValue
Description copied from class:JsonParserHelper method, usually equivalent to:getParsingContext().currentValue();Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.
- Specified by:
currentValuein classJsonParser- Returns:
- "Current value" for the current input context this parser has
-
close
Method that can be called to get the name associated with the current event.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classParserMinimalBase- Throws:
JacksonException
-
hasStringCharacters
public boolean hasStringCharacters()Description copied from class:JsonParserMethod that can be used to determine whether calling ofJsonParser.getStringCharacters()would be the most efficient way to access String value for the event parser currently points to (compared toJsonParser.getString()).- Specified by:
hasStringCharactersin classJsonParser- Returns:
- True if parser currently has character array that can
be efficiently returned via
JsonParser.getStringCharacters(); false means that it may or may not exist
-
getBinaryValue
Description copied from class:JsonParserMethod that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value. It works similar to getting String value viaJsonParser.getString()and decoding result (except for decoding part), but should be significantly more performant.Note that non-decoded textual contents of the current token are not guaranteed to be accessible after this method is called. Current implementation, for example, clears up textual content during decoding. Decoded binary content, however, will be retained until parser is advanced to the next event.
- Specified by:
getBinaryValuein classJsonParser- Parameters:
variant- Expected variant of base64 encoded content (seeBase64Variantsfor definitions of "standard" variants).- Returns:
- Decoded binary data
- Throws:
JacksonIOException- for low-level read issuesStreamReadException- for decoding problemsJacksonException
-
getTokenCharacterOffset
public long getTokenCharacterOffset() -
getTokenLineNr
public int getTokenLineNr() -
getTokenColumnNr
public int getTokenColumnNr() -
_releaseBuffers
protected void _releaseBuffers()Description copied from class:ParserMinimalBaseMethod called to release internal buffers owned by the base reader. This is expected to be called afterParserMinimalBase._closeInput()since the buffers are expected not to be needed any longer.- Specified by:
_releaseBuffersin classParserMinimalBase
-
_handleEOF
Method called when an EOF is encountered between tokens. If so, it may be a legitimate EOF, but only if there is no open non-root context.- Specified by:
_handleEOFin classParserMinimalBase- Throws:
JacksonException- if end-of-content not allowed at current position.
-
_eofAsNextChar
- Returns:
- If no exception is thrown,
-1which is used as marked for "end-of-input" - Throws:
StreamReadException- If check on_handleEOF()fails; usually because the current context is not root context (missing end markers in content)
-
_getByteArrayBuilder
-
reset
protected final JsonToken reset(boolean negative, int intLen, int fractLen, int expLen) throws JacksonException - Throws:
JacksonException
-
resetInt
- Throws:
JacksonException
-
resetFloat
protected final JsonToken resetFloat(boolean negative, int intLen, int fractLen, int expLen) throws JacksonException - Throws:
JacksonException
-
resetAsNaN
-
isNaN
public boolean isNaN()Description copied from class:JsonParserAccessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). These values are not supported by all formats: JSON, for example, only supports them ifJsonReadFeature.ALLOW_NON_NUMERIC_NUMBERSis enabled.NOTE: in case where numeric value is outside range of requested type -- most notably
FloatorDouble-- and decoding results effectively in a NaN value, this method DOES NOT returntrue: only explicit incoming markers do. This is because value could still be accessed as a validBigDecimal.- Specified by:
isNaNin classJsonParser- Returns:
Trueif the current token is reported asJsonToken.VALUE_NUMBER_FLOATand represents a "Not a Number" value;falsefor other tokens and regular floating-point numbers.
-
getNumberValue
Description copied from class:JsonParserGeneric number value accessor method that will work for all kinds of numeric values. It will return the optimal (simplest/smallest possible) wrapper object that can express the numeric value just parsed.- Specified by:
getNumberValuein classJsonParser- Returns:
- Numeric value of the current token in its most optimal representation
-
getNumberValueExact
Description copied from class:JsonParserMethod similar toJsonParser.getNumberValue()with the difference that for floating-point numbers value returned may beBigDecimalif the underlying format does not store floating-point numbers using native representation: for example, textual formats represent numbers as Strings (which are 10-based), and conversion toDoubleis potentially lossy operation.Default implementation simply returns
JsonParser.getNumberValue()- Overrides:
getNumberValueExactin classParserMinimalBase- Returns:
- Numeric value of the current token using most accurate representation
-
getNumberValueDeferred
Description copied from class:JsonParserMethod similar toJsonParser.getNumberValue()but that returns either sameNumbervalue asJsonParser.getNumberValue()(if already decoded), orStringrepresentation of as-of-yet undecoded number. Typically textual formats allow deferred decoding from String, whereas binary formats either decode numbers eagerly or have binary representation from which to decode value to return.Same constraints apply to calling this method as to
JsonParser.getNumberValue(): current token must be eitherJsonToken.VALUE_NUMBER_INTorJsonToken.VALUE_NUMBER_FLOAT; otherwise an exception is thrownDefault implementation simply returns
JsonParser.getNumberValue()- Overrides:
getNumberValueDeferredin classParserMinimalBase- Returns:
- Either
Number(for already decoded numbers) orString(for deferred decoding).
-
getNumberType
Description copied from class:JsonParserIf current token is of typeJsonToken.VALUE_NUMBER_INTorJsonToken.VALUE_NUMBER_FLOAT, returns one ofJsonParser.NumberTypeconstants; otherwise returns null.NOTE: in Jackson 2.x, an exception was wrong if called for non-numeric token.
- Specified by:
getNumberTypein classJsonParser- Returns:
- Type of current number, if parser points to numeric token;
nullotherwise
-
getIntValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it can be expressed as a value of Java int primitive type. It can also be called forJsonToken.VALUE_NUMBER_FLOAT; if so, it is equivalent to callingJsonParser.getDoubleValue()and then casting; except for possible overflow/underflow exception.Note: if the resulting integer value falls outside range of Java
int, aInputCoercionExceptionmay be thrown to indicate numeric overflow/underflow.- Specified by:
getIntValuein classJsonParser- Returns:
- Current number value as
int(if numeric token within Java 32-bit signedintrange); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a number OR numeric value exceeds allowed rangeJacksonException
-
getLongValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it can be expressed as a Java long primitive type. It can also be called forJsonToken.VALUE_NUMBER_FLOAT; if so, it is equivalent to callingJsonParser.getDoubleValue()and then casting toint; except for possible overflow/underflow exception.Note: if the token is an integer, but its value falls outside of range of Java long, a
InputCoercionExceptionmay be thrown to indicate numeric overflow/underflow.- Specified by:
getLongValuein classJsonParser- Returns:
- Current number value as
long(if numeric token within Java 32-bit signedlongrange); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a number OR numeric value exceeds allowed rangeJacksonException
-
getBigIntegerValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_INTand it cannot be used as a Java long primitive type due to its magnitude. It can also be called forJsonToken.VALUE_NUMBER_FLOAT; if so, it is equivalent to callingJsonParser.getDecimalValue()and then constructing aBigIntegerfrom that value.- Specified by:
getBigIntegerValuein classJsonParser- Returns:
- Current number value as
BigInteger(if numeric token); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a numberJacksonException
-
getFloatValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATand it can be expressed as a Java float primitive type. It can also be called forJsonToken.VALUE_NUMBER_INT; if so, it is equivalent to callingJsonParser.getLongValue()and then casting; except for possible overflow/underflow exception.Note: if the value falls outside of range of Java float, a
InputCoercionExceptionwill be thrown to indicate numeric overflow/underflow.- Specified by:
getFloatValuein classJsonParser- Returns:
- Current number value as
float(if numeric token within Javafloatrange); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a number OR numeric value exceeds allowed rangeJacksonException
-
getDoubleValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATand it can be expressed as a Java double primitive type. It can also be called forJsonToken.VALUE_NUMBER_INT; if so, it is equivalent to callingJsonParser.getLongValue()and then casting; except for possible overflow/underflow exception.Note: if the value falls outside of range of Java double, a
InputCoercionExceptionwill be thrown to indicate numeric overflow/underflow.- Specified by:
getDoubleValuein classJsonParser- Returns:
- Current number value as
double(if numeric token within Javadoublerange); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a number OR numeric value exceeds allowed rangeJacksonException
-
getDecimalValue
Description copied from class:JsonParserNumeric accessor that can be called when the current token is of typeJsonToken.VALUE_NUMBER_FLOATorJsonToken.VALUE_NUMBER_INT. No under/overflow exceptions are ever thrown.- Specified by:
getDecimalValuein classJsonParser- Returns:
- Current number value as
BigDecimal(if numeric token); otherwise exception thrown - Throws:
InputCoercionException- If either token type is not a numberJacksonException
-
_parseNumericValue
protected abstract void _parseNumericValue(int expType) throws JacksonException, InputCoercionException Method that will parse actual numeric value out of a syntactically valid number value. Type it will parse into depends on whether it is a floating point number, as well as its magnitude: smallest legal type (of ones available) is used for efficiency.- Parameters:
expType- Numeric type that we will immediately need, if any; mostly necessary to optimize handling of floating point numbers- Throws:
JacksonIOException- for low-level read issuesInputCoercionException- if the current token not of numeric typeStreamReadException- for number decoding problemsJacksonException
-
_parseIntValue
- Throws:
JacksonException
-
convertNumberToInt
- Throws:
InputCoercionException
-
convertNumberToLong
- Throws:
InputCoercionException
-
convertNumberToBigInteger
protected void convertNumberToBigInteger() -
convertNumberToDouble
protected void convertNumberToDouble() -
convertNumberToFloat
protected void convertNumberToFloat() -
convertNumberToBigDecimal
protected void convertNumberToBigDecimal() -
_convertBigDecimalToBigInteger
-
_getBigInteger
Internal accessor that needs to be used for accessing number value of typeBigIntegerwhich -- as of 2.14 -- is typically lazily parsed.- Returns:
- BigInteger value decoded or converted for the current event
-
_getBigDecimal
Internal accessor that needs to be used for accessing number value of typeBigDecimalwhich -- as of 2.14 -- is typically lazily parsed.- Returns:
- BigDecimal value decoded or converted for the current event
-
_getNumberDouble
protected double _getNumberDouble()Internal accessor that needs to be used for accessing number value of typedoublewhich will be lazily parsed.- Returns:
doublevalue decoded or converted for the current event
-
_getNumberFloat
protected float _getNumberFloat()Internal accessor that needs to be used for accessing number value of typefloatwhich will be lazily parsed.- Returns:
floatvalue decoded or converted for the current event- Since:
- 2.15
-
_decodeEscaped
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- Returns:
- Character decoded, if any
- Throws:
JacksonException- If escape decoding fails
-
_decodeBase64Escape
protected final int _decodeBase64Escape(Base64Variant b64variant, int ch, int index) throws JacksonException - Throws:
JacksonException
-
_decodeBase64Escape
protected final int _decodeBase64Escape(Base64Variant b64variant, char ch, int index) throws JacksonException - Throws:
JacksonException
-
_reportInvalidBase64Char
protected <T> T _reportInvalidBase64Char(Base64Variant b64variant, int ch, int bindex) throws StreamReadException - Throws:
StreamReadException
-
_reportInvalidBase64Char
protected <T> T _reportInvalidBase64Char(Base64Variant b64variant, int ch, int bindex, String msg) throws StreamReadException - Throws:
StreamReadException
-
_handleBase64MissingPadding
- Throws:
StreamReadException
-
_contentReference
Helper method used to encapsulate logic of including (or not) of "content reference" when constructingTokenStreamLocationinstances.- Returns:
- ContentReference object to use.
-
_contentReferenceRedacted
Helper method used to encapsulate logic of providing "content reference" when constructingTokenStreamLocationinstances and source information is NOT to be included (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATIONdisabled).Default implementation will simply return
ContentReference.redacted().- Returns:
- ContentReference object to use when source is not to be included
-
growArrayBy
- Throws:
IllegalArgumentException
-
_growNameDecodeBuffer
- Throws:
StreamConstraintsException
-