Class CBORParser
java.lang.Object
com.fasterxml.jackson.core.JsonParser
com.fasterxml.jackson.core.base.ParserMinimalBase
com.fasterxml.jackson.dataformat.cbor.CBORParser
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned
,Closeable
,AutoCloseable
public class CBORParser
extends com.fasterxml.jackson.core.base.ParserMinimalBase
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration that defines all togglable features for CBOR generators.Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser
com.fasterxml.jackson.core.JsonParser.NumberType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
We will hold on to decoded binary data, for duration of current event, so that multiple calls togetBinaryValue(com.fasterxml.jackson.core.Base64Variant)
will not need to decode data more than once.protected boolean
Flag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not.protected com.fasterxml.jackson.core.util.ByteArrayBuilder
ByteArrayBuilder is needed if 'getBinaryValue' is called.private int
Helper variables used when dealing with chunked content.private int
Helper variables used when dealing with chunked content.protected boolean
Flag that indicates whether parser is closed or not.protected long
Number of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer).protected int
Current row location of current point in input buffer, starting from 1, if available.protected int
Current index of the first character of the current row in input buffer.protected byte[]
Current buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser.protected int
Index of character after last available one in the buffer.protected int
Pointer to next available character in bufferprotected InputStream
Input stream that can be used for reading more content, if one in use.protected final com.fasterxml.jackson.core.io.IOContext
I/O context for this reader.protected boolean
Flag set to indicate whether the field name is available from the name copy buffer or not (in addition to its String representation being available via read context)protected char[]
Temporary buffer that is needed if field name is accessed usinggetTextCharacters()
method (instead of String returning alternatives)protected BigDecimal
protected BigInteger
protected double
protected float
protected int
protected long
protected int
Bitfield that indicates which numeric representations have been calculated for the current typeprotected com.fasterxml.jackson.core.ObjectCodec
Codec used for data binding when (if) requested.protected CBORReadContext
Information about parser context, context in which the next token is to be parsed (root, array, object).protected int
Quads used for hash calculationprotected int
Quads used for hash calculationprotected int
Quads used for hash calculationprotected int[]
Temporary buffer used for name parsing.protected final com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer
Symbol table that contains field names encountered so farprotected int
We will keep track of tag value for possible future use.protected final com.fasterxml.jackson.core.util.TextBuffer
Buffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array)protected boolean
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)protected int
Column on input row that current token starts; 0-based (although in the end it'll be converted to 1-based)protected int
Input row on which current token starts, 1-basedprotected long
Total number of bytes/characters read before start of current token.protected int
Type byte of the current token(package private) static final BigDecimal
(package private) static final BigDecimal
(package private) static final BigDecimal
(package private) static final BigDecimal
(package private) static final BigInteger
(package private) static final BigInteger
(package private) static final BigInteger
(package private) static final BigInteger
private static final BigInteger
private static final double
private static final double
private static final Charset
private static final int[]
Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase
_currToken, _lastClearedToken, 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
ConstructorsConstructorDescriptionCBORParser
(com.fasterxml.jackson.core.io.IOContext ctxt, int parserFeatures, int cborFeatures, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable) -
Method Summary
Modifier and TypeMethodDescriptionprivate final String
_addDecodedToSymbols
(int len, String name) private final BigInteger
_bigNegative
(long l) private final BigInteger
_bigPositive
(long l) protected void
_checkNumericValue
(int expType) protected void
private final int
private final int
private final long
private final int
private final String
private final int
_decodeChunkedUTF8_3
(int c1) private final int
_decodeChunkedUTF8_4
(int c) private int
_decodeChunkLength
(int expType) private final int
_decodeExplicitLength
(int lowBits) Method used to decode explicit length of a variable-length value (or, for indefinite/chunked, indicate that one is not known).protected final com.fasterxml.jackson.core.JsonToken
private float
private final String
_decodeLongerName
(int len) protected final void
_decodeNonStringName
(int ch) Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.private final String
_decodeShortName
(int len) private final int
_decodeTag
(int lowBits) protected com.fasterxml.jackson.core.JsonToken
Helper method to encapsulate details of handling of mysterious `undefined` value that is allowed to be used as something encoder could not handle (as per spec), whatever the heck that should be.private final int
_decodeUTF8_3
(int c1) private final int
_decodeUTF8_4
(int c) private final String
_findDecodedFromSymbols
(int len) private final String
_findDecodedLong
(int len, int q1, int q2) Method for locating names longer than 8 bytes (in UTF-8)protected byte[]
_finishBytes
(int len) private final void
private final void
_finishLongText
(int len) private final String
_finishShortText
(int len) protected String
_finishTextToken
(int ch) protected void
Method called to finish parsing of a token so that token contents are retriableprotected com.fasterxml.jackson.core.util.ByteArrayBuilder
private static int[]
_growArrayTo
(int[] arr, int minSize) protected com.fasterxml.jackson.core.JsonToken
protected void
protected com.fasterxml.jackson.core.JsonToken
_handleTaggedArray
(int tag, int len) protected com.fasterxml.jackson.core.JsonToken
_handleTaggedBinary
(int tag) protected void
_invalidToken
(int ch) protected final void
_loadToHaveAtLeast
(int minAvailable) Helper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessaryprivate static final long
_long
(int i1, int i2) private final int
private final int
private final int
protected String
_numberToName
(int ch, boolean neg) private int
_readAndWriteBytes
(OutputStream out, int total) protected void
Method called to release internal buffers owned by the base reader.protected void
_reportInvalidChar
(int c) protected void
_reportInvalidInitial
(int mask) protected void
_reportInvalidOther
(int mask) protected void
_reportInvalidOther
(int mask, int ptr) protected void
protected void
_skipBytes
(int len) protected void
_skipBytesL
(long llen) protected void
_skipChunked
(int expectedType) protected void
Method called to skip remainders of an incomplete token, when contents themselves will not be needed any more.private final int
_slow16()
private final int
_slow32()
private final long
_slow64()
void
close()
protected void
protected void
protected void
protected void
protected void
protected void
void
Method for forcing full read of current token, even if it might otherwise only be read if data is accessed viagetText()
and similar methods.byte[]
getBinaryValue
(com.fasterxml.jackson.core.Base64Variant b64variant) com.fasterxml.jackson.core.ObjectCodec
getCodec()
com.fasterxml.jackson.core.JsonLocation
Overridden since we do not really have character-based locations, but we do have byte offset to specify.Method that can be called to get the name associated with the current event.int
Method that can be used to access tag id associated with the most recently decoded value (whether completely, for scalar values, or partially, for Objects/Arrays), if any.double
float
int
int
long
com.fasterxml.jackson.core.JsonParser.NumberType
getText()
Method for accessing textual representation of the current event; if no current event (before first call tonextToken()
, or after encountering end-of-input), returns null.int
char[]
int
int
com.fasterxml.jackson.core.JsonLocation
Overridden since we do not really have character-based locations, but we do have byte offset to specify.getValueAsString
(String defaultValue) boolean
boolean
isClosed()
boolean
isNaN()
protected final boolean
loadMore()
protected final void
boolean
nextFieldName
(com.fasterxml.jackson.core.SerializableString str) int
nextIntValue
(int defaultValue) long
nextLongValue
(long defaultValue) com.fasterxml.jackson.core.JsonToken
void
overrideCurrentName
(String name) int
readBinaryValue
(com.fasterxml.jackson.core.Base64Variant b64variant, OutputStream out) int
void
setCodec
(com.fasterxml.jackson.core.ObjectCodec c) com.fasterxml.jackson.core.Version
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, canParseAsync, canReadObjectId, canReadTypeId, canUseSchema, configure, currentName, disable, enable, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getFeatureMask, getNonBlockingInputFeeder, getObjectId, getSchema, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, overrideFormatFeatures, overrideStdFeatures, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, requiresCustomCodec, setCurrentValue, setFeatureMask, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchema
-
Field Details
-
UTF8
-
UTF8_UNIT_CODES
private static final int[] UTF8_UNIT_CODES -
MATH_POW_2_10
private static final double MATH_POW_2_10 -
MATH_POW_2_NEG14
private static final double MATH_POW_2_NEG14 -
_objectCodec
protected com.fasterxml.jackson.core.ObjectCodec _objectCodecCodec used for data binding when (if) requested. -
_ioContext
protected final com.fasterxml.jackson.core.io.IOContext _ioContextI/O context for this reader. It handles buffer allocation for the reader. -
_closed
protected boolean _closedFlag that indicates whether parser is closed or not. Gets set when parser is either closed by explicit call (close()
) or when end-of-input is reached. -
_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) -
_parsingContext
Information about parser context, context in which the next token is to be parsed (root, array, object). -
_textBuffer
protected final com.fasterxml.jackson.core.util.TextBuffer _textBufferBuffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array) -
_nameCopyBuffer
protected char[] _nameCopyBufferTemporary buffer that is needed if field name is accessed usinggetTextCharacters()
method (instead of String returning alternatives) -
_nameCopied
protected boolean _nameCopiedFlag set to indicate whether the field name is available from the name copy buffer or not (in addition to its String representation being available via read context) -
_byteArrayBuilder
protected com.fasterxml.jackson.core.util.ByteArrayBuilder _byteArrayBuilderByteArrayBuilder 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(com.fasterxml.jackson.core.Base64Variant)
will not need to decode data more than once. -
_tagValue
protected int _tagValueWe will keep track of tag value for possible future use. -
_inputStream
Input stream that can be used for reading more content, if one in use. May be null, if input comes just as a full buffer, or if the stream has been closed. -
_inputBuffer
protected byte[] _inputBufferCurrent buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser. -
_bufferRecyclable
protected boolean _bufferRecyclableFlag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not.If it is not, it also means that parser can NOT modify underlying buffer.
-
_tokenIncomplete
protected boolean _tokenIncompleteFlag 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) -
_typeByte
protected int _typeByteType byte of the current token -
_chunkLeft
private int _chunkLeftHelper variables used when dealing with chunked content. -
_chunkEnd
private int _chunkEndHelper variables used when dealing with chunked content. -
_symbols
protected final com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer _symbolsSymbol table that contains field names encountered so far -
_quadBuffer
protected int[] _quadBufferTemporary buffer used for name parsing. -
_quad1
protected int _quad1Quads used for hash calculation -
_quad2
protected int _quad2Quads used for hash calculation -
_quad3
protected int _quad3Quads used for hash calculation -
BI_MIN_INT
-
BI_MAX_INT
-
BI_MIN_LONG
-
BI_MAX_LONG
-
BD_MIN_LONG
-
BD_MAX_LONG
-
BD_MIN_INT
-
BD_MAX_INT
-
_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
-
BIT_63
-
-
Constructor Details
-
CBORParser
public CBORParser(com.fasterxml.jackson.core.io.IOContext ctxt, int parserFeatures, int cborFeatures, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
-
-
Method Details
-
getCodec
public com.fasterxml.jackson.core.ObjectCodec getCodec()- Specified by:
getCodec
in classcom.fasterxml.jackson.core.JsonParser
-
setCodec
public void setCodec(com.fasterxml.jackson.core.ObjectCodec c) - Specified by:
setCodec
in classcom.fasterxml.jackson.core.JsonParser
-
version
public com.fasterxml.jackson.core.Version version()- Specified by:
version
in interfacecom.fasterxml.jackson.core.Versioned
- Specified by:
version
in classcom.fasterxml.jackson.core.JsonParser
-
getFormatFeatures
public int getFormatFeatures()- Overrides:
getFormatFeatures
in classcom.fasterxml.jackson.core.JsonParser
-
getCurrentTag
public int getCurrentTag()Method that can be used to access tag id associated with the most recently decoded value (whether completely, for scalar values, or partially, for Objects/Arrays), if any. If no tag was associated with it, -1 is returned.- Since:
- 2.5
-
releaseBuffered
- Overrides:
releaseBuffered
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getInputSource
- Overrides:
getInputSource
in classcom.fasterxml.jackson.core.JsonParser
-
getTokenLocation
public com.fasterxml.jackson.core.JsonLocation getTokenLocation()Overridden since we do not really have character-based locations, but we do have byte offset to specify.- Specified by:
getTokenLocation
in classcom.fasterxml.jackson.core.JsonParser
-
getCurrentLocation
public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()Overridden since we do not really have character-based locations, but we do have byte offset to specify.- Specified by:
getCurrentLocation
in classcom.fasterxml.jackson.core.JsonParser
-
getCurrentName
Method that can be called to get the name associated with the current event.- Specified by:
getCurrentName
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
overrideCurrentName
- Specified by:
overrideCurrentName
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
getParsingContext
- Specified by:
getParsingContext
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
hasTextCharacters
public boolean hasTextCharacters()- Specified by:
hasTextCharacters
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
_releaseBuffers
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).- Throws:
IOException
-
nextToken
- Specified by:
nextToken
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
_numberToName
- Throws:
IOException
-
_handleTaggedBinary
- Throws:
IOException
-
_handleTaggedArray
protected com.fasterxml.jackson.core.JsonToken _handleTaggedArray(int tag, int len) throws IOException - Throws:
IOException
-
finishToken
Method for forcing full read of current token, even if it might otherwise only be read if data is accessed viagetText()
and similar methods.- Overrides:
finishToken
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextFieldName
- Overrides:
nextFieldName
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextFieldName
- Overrides:
nextFieldName
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextTextValue
- Overrides:
nextTextValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextIntValue
- Overrides:
nextIntValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextLongValue
- Overrides:
nextLongValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
nextBooleanValue
- Overrides:
nextBooleanValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getText
Method for accessing textual representation of the current event; if no current event (before first call tonextToken()
, or after encountering end-of-input), returns null. Method can be called for any event.- Specified by:
getText
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getTextCharacters
- Specified by:
getTextCharacters
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getTextLength
- Specified by:
getTextLength
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getTextOffset
- Specified by:
getTextOffset
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getValueAsString
- Overrides:
getValueAsString
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getValueAsString
- Overrides:
getValueAsString
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getText
- Overrides:
getText
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getBinaryValue
public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) throws IOException - Specified by:
getBinaryValue
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
IOException
-
getEmbeddedObject
- Overrides:
getEmbeddedObject
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
readBinaryValue
public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant, OutputStream out) throws IOException - Overrides:
readBinaryValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
_readAndWriteBytes
- Throws:
IOException
-
isNaN
public boolean isNaN()- Overrides:
isNaN
in classcom.fasterxml.jackson.core.JsonParser
-
getNumberValue
- Specified by:
getNumberValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getNumberType
- Specified by:
getNumberType
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getIntValue
- Specified by:
getIntValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getLongValue
- Specified by:
getLongValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getBigIntegerValue
- Specified by:
getBigIntegerValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getFloatValue
- Specified by:
getFloatValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getDoubleValue
- Specified by:
getDoubleValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
getDecimalValue
- Specified by:
getDecimalValue
in classcom.fasterxml.jackson.core.JsonParser
- Throws:
IOException
-
_checkNumericValue
- Throws:
IOException
-
convertNumberToInt
- Throws:
IOException
-
convertNumberToLong
- Throws:
IOException
-
convertNumberToBigInteger
- Throws:
IOException
-
convertNumberToFloat
- Throws:
IOException
-
convertNumberToDouble
- Throws:
IOException
-
convertNumberToBigDecimal
- Throws:
IOException
-
_finishToken
Method called to finish parsing of a token so that token contents are retriable- Throws:
IOException
-
_finishTextToken
- Throws:
IOException
- Since:
- 2.6
-
_finishShortText
- Throws:
IOException
-
_finishLongText
- Throws:
IOException
-
_finishChunkedText
- Throws:
IOException
-
_nextByte
- Throws:
IOException
-
_nextChunkedByte
- Throws:
IOException
-
_nextChunkedByte2
- Throws:
IOException
-
_finishBytes
- Throws:
IOException
-
_decodeFieldName
- Throws:
IOException
-
_decodeShortName
- Throws:
IOException
-
_decodeLongerName
- Throws:
IOException
-
_decodeChunkedName
- Throws:
IOException
-
_decodeNonStringName
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.- Throws:
IOException
-
_findDecodedFromSymbols
- Throws:
IOException
-
_findDecodedLong
Method for locating names longer than 8 bytes (in UTF-8)- Throws:
IOException
-
_addDecodedToSymbols
-
_growArrayTo
private static int[] _growArrayTo(int[] arr, int minSize) -
_skipIncomplete
Method called to skip remainders of an incomplete token, when contents themselves will not be needed any more. Only called or byte array and text.- Throws:
IOException
-
_skipChunked
- Throws:
IOException
-
_skipBytesL
- Throws:
IOException
-
_skipBytes
- Throws:
IOException
-
_decodeTag
- Throws:
IOException
-
_decodeExplicitLength
Method used to decode explicit length of a variable-length value (or, for indefinite/chunked, indicate that one is not known). Note that long (64-bit) length is only allowed if it fits in 32-bit signed int, for now; expectation being that longer values are always encoded as chunks.- Throws:
IOException
-
_decodeChunkLength
- Throws:
IOException
-
_decodeHalfSizeFloat
- Throws:
IOException
-
_decode8Bits
- Throws:
IOException
-
_decode16Bits
- Throws:
IOException
-
_slow16
- Throws:
IOException
-
_decode32Bits
- Throws:
IOException
-
_slow32
- Throws:
IOException
-
_decode64Bits
- Throws:
IOException
-
_slow64
- Throws:
IOException
-
_long
private static final long _long(int i1, int i2) -
_decodeUndefinedValue
Helper method to encapsulate details of handling of mysterious `undefined` value that is allowed to be used as something encoder could not handle (as per spec), whatever the heck that should be. Current definition for 2.9 is that we will be returnJsonToken.VALUE_NULL
, but for later versions it is likely that we will alternatively allow decoding asJsonToken.VALUE_EMBEDDED_OBJECT
with "embedded value" of `null`.- Throws:
IOException
- Since:
- 2.9.6
-
_decodeUTF8_3
- Throws:
IOException
-
_decodeChunkedUTF8_3
- Throws:
IOException
-
_decodeUTF8_4
- Returns:
- Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
- Throws:
IOException
-
_decodeChunkedUTF8_4
- Throws:
IOException
-
loadMore
- Throws:
IOException
-
loadMoreGuaranteed
- Throws:
IOException
-
_loadToHaveAtLeast
Helper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessary- Throws:
IOException
-
_getByteArrayBuilder
protected com.fasterxml.jackson.core.util.ByteArrayBuilder _getByteArrayBuilder() -
_closeInput
- Throws:
IOException
-
_handleEOF
protected void _handleEOF() throws com.fasterxml.jackson.core.JsonParseException- Specified by:
_handleEOF
in classcom.fasterxml.jackson.core.base.ParserMinimalBase
- Throws:
com.fasterxml.jackson.core.JsonParseException
-
_handleCBOREOF
- Throws:
IOException
-
_invalidToken
protected void _invalidToken(int ch) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_reportUnexpectedBreak
- Throws:
IOException
-
_reportInvalidChar
protected void _reportInvalidChar(int c) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_reportInvalidInitial
protected void _reportInvalidInitial(int mask) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_reportInvalidOther
protected void _reportInvalidOther(int mask) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_reportInvalidOther
protected void _reportInvalidOther(int mask, int ptr) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_bigPositive
-
_bigNegative
-