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 enumEnumeration that defines all togglable features for CBOR generators.protected static final classType to keep track of a list of string references.protected static final classType to keep a stack of string refs based on namespaces within the document.static final classClass for keeping track of tags in an optimized manner.Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser
com.fasterxml.jackson.core.JsonParser.NumberType, com.fasterxml.jackson.core.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(Base64Variant)will not need to decode data more than once.protected booleanFlag 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.ByteArrayBuilderByteArrayBuilder is needed if 'getBinaryValue' is called.protected booleanFlag that indicates whether parser is closed or not.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 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 intIndex of character after last available one in the buffer.protected intPointer to next available character in bufferprotected InputStreamInput stream that can be used for reading more content, if one in use.protected final com.fasterxml.jackson.core.io.IOContextI/O context for this reader.protected booleanFlag 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 BigDecimalprotected BigIntegerprotected doubleprotected floatprotected intprotected longprotected intBitfield that indicates which numeric representations have been calculated for the current typeprotected com.fasterxml.jackson.core.ObjectCodecCodec used for data binding when (if) requested.protected intQuads used for hash calculationprotected intQuads used for hash calculationprotected intQuads used for hash calculationprotected int[]Temporary buffer used for name parsing.protected StringShared string that should be used in place of _textBuffer when a string reference is used.protected final com.fasterxml.jackson.core.StreamReadConstraintsprotected CBORReadContextInformation about parser context, context in which the next token is to be parsed (root, array, object).protected CBORParser.StringRefListStackStack of text and binary string references.protected final com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizerSymbol table that contains field names encountered so farprotected final booleanMarker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization.protected CBORParser.TagListWe will keep track of tag values for possible future use.protected final com.fasterxml.jackson.core.util.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)protected booleanFlag 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 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.protected intType byte of the current tokenprotected static final com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> protected static final intFields 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_UNKNOWNFields inherited from class com.fasterxml.jackson.core.JsonParser
_features, _requestPayload, DEFAULT_READ_CAPABILITIES -
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 TypeMethodDescriptionprotected final booleanprotected final boolean_checkNextIsIntInArray(String typeDesc) Heavily simplified method that does a subset of whatnextToken()does to basically only (1) determine that we are gettingJsonToken.VALUE_NUMBER_INT(if not, return with no processing) and (2) if so, prepare state so that number accessor method will work).protected void_checkNumericValue(int expType) protected voidprotected final void_decodeNonStringName(int ch, CBORParser.TagList tags) Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.protected final com.fasterxml.jackson.core.JsonTokencom.fasterxml.jackson.core.JsonToken_decodeSimpleValue(int lowBits, int ch) Helper method that deals with details of decoding unallocated "simple values" and exposing them as expected token.protected com.fasterxml.jackson.core.JsonTokenHelper 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.protected com.fasterxml.jackson.core.JsonTokenprotected byte[]_finishBytes(int len) Helper called to complete reading of binary data ("byte string") in case contents are needed.protected byte[]protected byte[]_finishLongContiguousBytes(int expLen) protected String_finishTextToken(int ch) protected voidMethod called to finish parsing of a token so that token contents are retriableprotected com.fasterxml.jackson.core.util.ByteArrayBuilderprotected voidprotected com.fasterxml.jackson.core.JsonToken_handleTaggedArray(CBORParser.TagList tags, int len) protected com.fasterxml.jackson.core.JsonTokenprotected com.fasterxml.jackson.core.JsonTokenprotected 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 necessaryprotected String_numberToName(int ch, boolean neg, CBORParser.TagList tags) protected voidMethod called to release internal buffers owned by the base reader.protected void_reportIncompleteBinaryRead(int expLen, int actLen) protected void_reportInvalidInitial(int mask) protected void_reportInvalidOther(int mask) protected void_reportInvalidOther(int mask, int ptr) protected <T> Tprotected void_skipBytes(int len) protected void_skipBytesL(long llen) protected void_skipChunked(int expectedType) protected voidMethod called to skip remainders of an incomplete token, when contents themselves will not be needed any more.protected final boolean_tryToLoadToHaveAtLeast(int minAvailable) voidclose()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidcom.fasterxml.jackson.core.JsonLocationOverridden 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.com.fasterxml.jackson.core.JsonLocationOverridden since we do not really have character-based locations, but we do have byte offset to specify.voidMethod 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.ObjectCodecgetCodec()com.fasterxml.jackson.core.JsonLocationDeprecated.Deprecated.intMethod 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.Method that can be used to access all tag ids associated with the most recently decoded value (whether completely, for scalar values, or partially, for Objects/Arrays), if any.doublefloatintintlongcom.fasterxml.jackson.core.JsonParser.NumberTypecom.fasterxml.jackson.core.JsonParser.NumberTypeFPfinal Numbercom.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> 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.intchar[]intintcom.fasterxml.jackson.core.JsonLocationDeprecated.getValueAsString(String defaultValue) booleanbooleanisClosed()booleanisNaN()protected booleanloadMore()protected voidbooleannextFieldName(com.fasterxml.jackson.core.SerializableString str) intnextIntValue(int defaultValue) longnextLongValue(long defaultValue) com.fasterxml.jackson.core.JsonTokenvoidoverrideCurrentName(String name) intreadBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant, OutputStream out) intvoidsetCodec(com.fasterxml.jackson.core.ObjectCodec c) com.fasterxml.jackson.core.StreamReadConstraintscom.fasterxml.jackson.core.Versionversion()Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase
_ascii, _asciiBytes, _constructError, _currentLocationMinusOne, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _throwInternalReturnAny, _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, skipChildrenMethods inherited from class com.fasterxml.jackson.core.JsonParser
_codec, _constructError, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, assignCurrentValue, canParseAsync, canReadObjectId, canReadTypeId, canUseSchema, configure, currentValue, disable, enable, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getFeatureMask, getNonBlockingInputFeeder, getNumberValueDeferred, 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
-
LONGEST_NON_CHUNKED_BINARY
protected static final int LONGEST_NON_CHUNKED_BINARY- See Also:
-
CBOR_READ_CAPABILITIES
protected static final com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> CBOR_READ_CAPABILITIES -
_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. -
_streamReadConstraints
protected final com.fasterxml.jackson.core.StreamReadConstraints _streamReadConstraints- Since:
- 2.17
-
_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) -
_streamReadContext
Information about parser context, context in which the next token is to be parsed (root, array, object).NOTE: before 2.13 was "_parsingContext"
-
_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(Base64Variant)will not need to decode data more than once. -
_tagValues
We will keep track of tag values for possible future use.- Since:
- 2.15
-
_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 -
_stringRefs
Stack of text and binary string references.- Since:
- 2.15
-
_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.
-
_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 -
_symbolsCanonical
protected final boolean _symbolsCanonicalMarker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization. May be disabled in which case alternate stream-line, non-canonicalizing handling is used: usually due to set of symbols (Object property names) is unbounded and will not benefit from canonicalization attempts.- Since:
- 2.13
-
_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
-
-
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
-
streamReadConstraints
public com.fasterxml.jackson.core.StreamReadConstraints streamReadConstraints()- Overrides:
streamReadConstraintsin classcom.fasterxml.jackson.core.JsonParser
-
getCodec
public com.fasterxml.jackson.core.ObjectCodec getCodec()- Specified by:
getCodecin classcom.fasterxml.jackson.core.JsonParser
-
setCodec
public void setCodec(com.fasterxml.jackson.core.ObjectCodec c) - Specified by:
setCodecin classcom.fasterxml.jackson.core.JsonParser
-
version
public com.fasterxml.jackson.core.Version version()- Specified by:
versionin interfacecom.fasterxml.jackson.core.Versioned- Specified by:
versionin classcom.fasterxml.jackson.core.JsonParser
-
getFormatFeatures
public int getFormatFeatures()- Overrides:
getFormatFeaturesin classcom.fasterxml.jackson.core.JsonParser
-
getReadCapabilities
public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> getReadCapabilities()- Overrides:
getReadCapabilitiesin 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
-
getCurrentTags
Method that can be used to access all tag ids associated with the most recently decoded value (whether completely, for scalar values, or partially, for Objects/Arrays), if any.- Since:
- 2.15
-
releaseBuffered
- Overrides:
releaseBufferedin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getInputSource
- Overrides:
getInputSourcein classcom.fasterxml.jackson.core.JsonParser
-
currentLocation
public com.fasterxml.jackson.core.JsonLocation currentLocation()Overridden since we do not really have character-based locations, but we do have byte offset to specify.- Overrides:
currentLocationin classcom.fasterxml.jackson.core.JsonParser
-
currentTokenLocation
public com.fasterxml.jackson.core.JsonLocation currentTokenLocation()Overridden since we do not really have character-based locations, but we do have byte offset to specify.- Overrides:
currentTokenLocationin classcom.fasterxml.jackson.core.JsonParser
-
getCurrentLocation
Deprecated.- Specified by:
getCurrentLocationin classcom.fasterxml.jackson.core.JsonParser
-
getTokenLocation
Deprecated.- Specified by:
getTokenLocationin classcom.fasterxml.jackson.core.JsonParser
-
currentName
Method that can be called to get the name associated with the current event.- Overrides:
currentNamein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getCurrentName
Deprecated.- Specified by:
getCurrentNamein classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
overrideCurrentName
- Specified by:
overrideCurrentNamein classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
isClosed
public boolean isClosed()- Specified by:
isClosedin classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
getParsingContext
- Specified by:
getParsingContextin classcom.fasterxml.jackson.core.base.ParserMinimalBase
-
hasTextCharacters
public boolean hasTextCharacters()- Specified by:
hasTextCharactersin 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:
nextTokenin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
_numberToName
- Throws:
IOException
-
_handleTaggedInt
protected com.fasterxml.jackson.core.JsonToken _handleTaggedInt(CBORParser.TagList tags) throws IOException - Throws:
IOException
-
_handleTaggedBinary
protected com.fasterxml.jackson.core.JsonToken _handleTaggedBinary(CBORParser.TagList tags) throws IOException - Throws:
IOException
-
_handleTaggedArray
protected com.fasterxml.jackson.core.JsonToken _handleTaggedArray(CBORParser.TagList tags, int len) throws IOException - Throws:
IOException
-
_checkNextIsIntInArray
Heavily simplified method that does a subset of whatnextToken()does to basically only (1) determine that we are gettingJsonToken.VALUE_NUMBER_INT(if not, return with no processing) and (2) if so, prepare state so that number accessor method will work).Note that in particular this method DOES NOT reset state that
nextToken()would do, but will change current token type to allow access.- Throws:
IOException
-
_checkNextIsEndArray
- 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:
finishTokenin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextFieldName
- Overrides:
nextFieldNamein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextFieldName
- Overrides:
nextFieldNamein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextTextValue
- Overrides:
nextTextValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextIntValue
- Overrides:
nextIntValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextLongValue
- Overrides:
nextLongValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
nextBooleanValue
- Overrides:
nextBooleanValuein 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:
getTextin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getTextCharacters
- Specified by:
getTextCharactersin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getTextLength
- Specified by:
getTextLengthin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getTextOffset
- Specified by:
getTextOffsetin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getValueAsString
- Overrides:
getValueAsStringin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getValueAsString
- Overrides:
getValueAsStringin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getText
- Overrides:
getTextin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getBinaryValue
public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) throws IOException - Specified by:
getBinaryValuein classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
IOException
-
getEmbeddedObject
- Overrides:
getEmbeddedObjectin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
readBinaryValue
public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant, OutputStream out) throws IOException - Overrides:
readBinaryValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
isNaN
public boolean isNaN()- Overrides:
isNaNin classcom.fasterxml.jackson.core.JsonParser
-
getNumberValue
- Specified by:
getNumberValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getNumberValueExact
- Overrides:
getNumberValueExactin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getNumberType
- Specified by:
getNumberTypein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getNumberTypeFP
- Overrides:
getNumberTypeFPin classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getIntValue
- Specified by:
getIntValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getLongValue
- Specified by:
getLongValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getBigIntegerValue
- Specified by:
getBigIntegerValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getFloatValue
- Specified by:
getFloatValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getDoubleValue
- Specified by:
getDoubleValuein classcom.fasterxml.jackson.core.JsonParser- Throws:
IOException
-
getDecimalValue
- Specified by:
getDecimalValuein 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
-
_finishBytes
Helper called to complete reading of binary data ("byte string") in case contents are needed.- Throws:
IOException
-
_finishChunkedBytes
- Throws:
IOException
-
_finishLongContiguousBytes
- Throws:
IOException
-
_decodePropertyName
- Throws:
IOException
-
_decodeNonStringName
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT.- Throws:
IOException
-
_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
-
_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_OBJECTwith "embedded value" of `null`.- Throws:
IOException- Since:
- 2.9.6
-
_decodeSimpleValue
public com.fasterxml.jackson.core.JsonToken _decodeSimpleValue(int lowBits, int ch) throws IOException Helper method that deals with details of decoding unallocated "simple values" and exposing them as expected token.As of Jackson 2.12, simple values are exposed as
JsonToken.VALUE_NUMBER_INTs, but in later versions this is planned to be changed to separate value type.- Throws:
IOException- Since:
- 2.12
-
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
-
_tryToLoadToHaveAtLeast
- 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:
_handleEOFin classcom.fasterxml.jackson.core.base.ParserMinimalBase- Throws:
com.fasterxml.jackson.core.JsonParseException
-
_eofAsNextToken
- Throws:
IOException
-
_invalidToken
protected void _invalidToken(int ch) throws com.fasterxml.jackson.core.JsonParseException - Throws:
com.fasterxml.jackson.core.JsonParseException
-
_reportUnexpectedBreak
- Throws:
IOException
-
_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
-
_reportIncompleteBinaryRead
- Throws:
IOException
-