Class CBORParser

java.lang.Object
tools.jackson.core.JsonParser
tools.jackson.core.base.ParserMinimalBase
tools.jackson.core.base.ParserBase
tools.jackson.dataformat.cbor.CBORParser
All Implemented Interfaces:
Closeable, AutoCloseable, tools.jackson.core.Versioned

public class CBORParser extends tools.jackson.core.base.ParserBase
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final class 
    Type to keep track of a list of string references.
    protected static final class 
    Type to keep a stack of string refs based on namespaces within the document.
    static final class 
    Class for keeping track of tags in an optimized manner.

    Nested classes/interfaces inherited from class tools.jackson.core.JsonParser

    tools.jackson.core.JsonParser.NumberType, tools.jackson.core.JsonParser.NumberTypeFP
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Flag that indicates whether the input buffer is recyclable (and needs to be returned to recycler once we are done) or not.
    private int
    Helper variables used when dealing with chunked content.
    private int
    Helper variables used when dealing with chunked content.
    protected final int
    Bit flag composed of bits that indicate which CBORReadFeatures are enabled.
    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 InputStream
    Input stream that can be used for reading more content, if one in use.
    protected int
    Quads used for hash calculation
    protected int
    Quads used for hash calculation
    protected int
    Quads used for hash calculation
    protected int[]
    Temporary buffer used for name parsing.
    protected String
    Shared string that should be used in place of _textBuffer when a string reference is used.
    protected CBORSimpleValue
    When major type 7 value is encountered and exposed as JsonToken.VALUE_EMBEDDED_OBJECT, the value will be stored here.
    protected CBORReadContext
    Information about parser context, context in which the next token is to be parsed (root, array, object).
    Stack of text and binary string references.
    protected final tools.jackson.core.sym.ByteQuadsCanonicalizer
    Symbol table that contains field names encountered so far
    protected final boolean
    Marker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization.
    We will keep track of tag values for possible future use.
    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
    Type byte of the current token
    private static final BigInteger
     
    private static final BigInteger
     
    protected static final tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamReadCapability>
     
    protected static final int
     
    private static final double
     
    private static final double
     
    private static final Charset
     
    private static final int[]
     

    Fields inherited from class tools.jackson.core.base.ParserBase

    _binaryValue, _byteArrayBuilder, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _numberBigDecimal, _numberBigInt, _numberDouble, _numberFloat, _numberInt, _numberIsNaN, _numberLong, _numberNegative, _numberString, _numTypesValid, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal

    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_DEFAULTS

    Fields inherited from class tools.jackson.core.JsonParser

    DEFAULT_READ_CAPABILITIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    CBORParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int cborFeatures, tools.jackson.core.sym.ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private final String
    _addDecodedToSymbols(int len, String name)
     
    protected final BigInteger
    _bigNegative(long l)
     
    protected final BigInteger
    _bigPositive(long l)
     
    protected final boolean
     
    protected final boolean
    Heavily simplified method that does a subset of what nextToken() does to basically only (1) determine that we are getting JsonToken.VALUE_NUMBER_INT (if not, return with no processing) and (2) if so, prepare state so that number accessor method will work).
    protected void
     
    protected void
     
    protected void
     
    private final int
     
    private final int
     
    private final long
     
    private final int
     
    private final String
     
    private final int
     
    private final int
     
    private int
    _decodeChunkLength(int expType)
     
    private final String
     
    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).
    private float
     
    private final String
     
    protected final String
    Method that handles initial token type recognition for token that has to be either PROPERTY_NAME or END_OBJECT.
    protected final tools.jackson.core.JsonToken
     
    tools.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.
    private final int
    _decodeTag(int lowBits)
     
    protected tools.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
     
    protected tools.jackson.core.JsonToken
     
    private final String
    Helper method for trying to find specified encoded UTF-8 byte sequence from symbol table; if successful avoids actual decoding to String.
    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)
    Helper called to complete reading of binary data ("byte string") in case contents are needed.
    protected byte[]
     
    private final void
     
    private final boolean
    Reads in a tight loop ASCII text until a non-ASCII char is found.
    protected byte[]
     
    private final String
    _finishLongText(int len)
     
    private final int
    Consumes as many ascii chars as possible in a tight loop.
    private final String
     
    protected String
     
    protected void
    Method called to finish parsing of a token so that token contents are retriable
    private final byte[]
    _getBinaryFromString(tools.jackson.core.Base64Variant variant)
     
    private static int[]
    _growArrayTo(int[] arr, int minSize)
     
    protected void
     
    protected tools.jackson.core.JsonToken
     
    protected tools.jackson.core.JsonToken
     
    protected tools.jackson.core.JsonToken
     
    protected void
    _invalidToken(int ch)
     
    private final void
     
    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 necessary
    private static final long
    _long(int i1, int i2)
     
    private final int
     
    private final int
     
    private final int
     
    private int
    _nextFieldDecodeAndAdd(tools.jackson.core.sym.PropertyNameMatcher matcher, int len)
     
    private final int
    _nextFieldFromSymbolsLong(tools.jackson.core.sym.PropertyNameMatcher matcher, int len, int q1, int q2)
    Method for locating names longer than 8 bytes (in UTF-8)
    private final int
    _nextFieldOptimized(tools.jackson.core.sym.PropertyNameMatcher matcher, int len)
     
    private int
    _nextNameEmpty(tools.jackson.core.sym.PropertyNameMatcher matcher)
     
    private int
    _nextNameLong(tools.jackson.core.sym.PropertyNameMatcher matcher, int lenMarker)
     
    private int
    _nextNameNonText(tools.jackson.core.sym.PropertyNameMatcher matcher, int ch)
     
    protected String
    _numberToName(int ch, boolean neg, CBORParser.TagList tags)
     
    private static final int
    _padQuadForNulls(int firstByte)
     
    protected int
     
    protected void
    _parseNumericValue(int expType)
     
    private int
     
    protected void
    Method called to release internal buffers owned by the base reader.
    protected void
    _reportIncompleteBinaryRead(int expLen, int actLen)
     
    protected void
     
    protected void
     
    protected void
    _reportInvalidOther(int mask, int ptr)
     
    private String
    _reportTruncatedUTF8InName(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected)
     
    private String
    _reportTruncatedUTF8InString(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected)
     
    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
     
    private final int
     
    private final long
     
    protected final boolean
    _tryToLoadToHaveAtLeast(int minAvailable)
     
    void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    tools.jackson.core.TokenStreamLocation
    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.
    tools.jackson.core.TokenStreamLocation
    Overridden since we do not really have character-based locations, but we do have byte offset to specify.
     
    void
    Method for forcing full read of current token, even if it might otherwise only be read if data is accessed via getString() and similar methods.
    byte[]
    getBinaryValue(tools.jackson.core.Base64Variant b64variant)
     
    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.
    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.
     
    float
     
    tools.jackson.core.JsonParser.NumberType
     
    tools.jackson.core.JsonParser.NumberTypeFP
     
     
    final Number
     
    Method for accessing textual representation of the current event; if no current event (before first call to nextToken(), or after encountering end-of-input), returns null.
    int
    getString(Writer writer)
     
    char[]
     
    int
     
    int
     
     
    getValueAsString(String defaultValue)
     
    boolean
     
    boolean
     
    boolean
    Checking whether the current token represents an undefined value (0xF7).
    protected boolean
     
    protected void
     
     
    int
    nextIntValue(int defaultValue)
     
    long
    nextLongValue(long defaultValue)
     
     
    boolean
    nextName(tools.jackson.core.SerializableString str)
     
    int
    nextNameMatch(tools.jackson.core.sym.PropertyNameMatcher matcher)
     
     
    tools.jackson.core.JsonToken
     
    int
    readBinaryValue(tools.jackson.core.Base64Variant b64variant, OutputStream out)
     
    int
     
    tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamReadCapability>
     
    tools.jackson.core.TokenStreamContext
     
     
    tools.jackson.core.Version
     

    Methods inherited from class tools.jackson.core.base.ParserBase

    _contentReference, _contentReferenceRedacted, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _growNameDecodeBuffer, _handleBase64MissingPadding, _reportInvalidBase64Char, _reportInvalidBase64Char, close, getBigIntegerValue, getDecimalValue, getDoubleValue, getIntValue, getLongValue, getNumberValueDeferred, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, reset, resetAsNaN, resetFloat, resetInt

    Methods inherited from class tools.jackson.core.base.ParserMinimalBase

    _constructInputCoercion, _constructNotNumericType, _currentLocationMinusOne, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _nullSafeUpdateToken, _reportBadInputStream, _reportBadReader, _reportError, _reportError, _reportError, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidNumber, _reportInvalidSpace, _reportInvalidUTF8Surrogate, _reportMissingRootWS, _reportOverflowByte, _reportOverflowInt, _reportOverflowInt, _reportOverflowInt, _reportOverflowLong, _reportOverflowLong, _reportOverflowLong, _reportOverflowShort, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _updateToken, _updateTokenToNA, _updateTokenToNull, _wrapIOFailure, clearCurrentToken, currentNameMatch, currentToken, currentTokenCount, currentTokenId, getBooleanValue, getByteValue, getLastClearedToken, getShortValue, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, hasCurrentToken, hasToken, hasTokenId, isClosed, isEnabled, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, objectReadContext, readValueAs, readValueAs, readValueAs, readValueAsTree, skipChildren, streamReadConstraints, streamReadFeatures

    Methods inherited from class tools.jackson.core.JsonParser

    _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, getBinaryValue, getObjectId, getSchema, getText, getTextCharacters, getTextLength, getTextOffset, getTypeId, getValueAsBoolean, getValueAsDouble, nonBlockingInputFeeder, readBinaryValue, readString, releaseBuffered

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UTF8

      private static final Charset UTF8
    • UTF8_UNIT_CODES

      private static final int[] UTF8_UNIT_CODES
    • BI_MINUS_ONE

      private static final BigInteger BI_MINUS_ONE
    • MATH_POW_2_10

      private static final double MATH_POW_2_10
    • MATH_POW_2_NEG14

      private static final double MATH_POW_2_NEG14
    • LONGEST_NON_CHUNKED_BINARY

      protected static final int LONGEST_NON_CHUNKED_BINARY
      See Also:
    • CBOR_READ_CAPABILITIES

      protected static final tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamReadCapability> CBOR_READ_CAPABILITIES
    • _formatFeatures

      protected final int _formatFeatures
      Bit flag composed of bits that indicate which CBORReadFeatures are enabled.
    • _streamReadContext

      protected CBORReadContext _streamReadContext
      Information about parser context, context in which the next token is to be parsed (root, array, object).
    • _chunkLeft

      private int _chunkLeft
      Helper variables used when dealing with chunked content.
    • _chunkEnd

      private int _chunkEnd
      Helper variables used when dealing with chunked content.
    • _tagValues

      protected CBORParser.TagList _tagValues
      We will keep track of tag values for possible future use.
    • _simpleValue

      protected CBORSimpleValue _simpleValue
      When major type 7 value is encountered and exposed as JsonToken.VALUE_EMBEDDED_OBJECT, the value will be stored here.
      Since:
      2.20
    • _tokenIncomplete

      protected boolean _tokenIncomplete
      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)
    • _typeByte

      protected int _typeByte
      Type byte of the current token
    • _stringRefs

      protected CBORParser.StringRefListStack _stringRefs
      Stack of text and binary string references.
    • _sharedString

      protected String _sharedString
      Shared string that should be used in place of _textBuffer when a string reference is used.
    • _inputStream

      protected InputStream _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[] _inputBuffer
      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.
    • _bufferRecyclable

      protected boolean _bufferRecyclable
      Flag that indicates whether the input buffer is recyclable (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 tools.jackson.core.sym.ByteQuadsCanonicalizer _symbols
      Symbol table that contains field names encountered so far
    • _quadBuffer

      protected int[] _quadBuffer
      Temporary buffer used for name parsing.
    • _quad1

      protected int _quad1
      Quads used for hash calculation
    • _quad2

      protected int _quad2
      Quads used for hash calculation
    • _quad3

      protected int _quad3
      Quads used for hash calculation
    • _symbolsCanonical

      protected final boolean _symbolsCanonical
      Marker 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.
    • BIT_63

      private static final BigInteger BIT_63
  • Constructor Details

    • CBORParser

      public CBORParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int cborFeatures, tools.jackson.core.sym.ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
  • Method Details

    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.core.JsonParser
    • streamReadCapabilities

      public tools.jackson.core.util.JacksonFeatureSet<tools.jackson.core.StreamReadCapability> streamReadCapabilities()
      Overrides:
      streamReadCapabilities in class tools.jackson.core.base.ParserMinimalBase
    • 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.
    • getCurrentTags

      public CBORParser.TagList 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
    • streamReadContext

      public tools.jackson.core.TokenStreamContext streamReadContext()
      Specified by:
      streamReadContext in class tools.jackson.core.JsonParser
    • assignCurrentValue

      public void assignCurrentValue(Object v)
      Overrides:
      assignCurrentValue in class tools.jackson.core.base.ParserBase
    • currentValue

      public Object currentValue()
      Overrides:
      currentValue in class tools.jackson.core.base.ParserBase
    • releaseBuffered

      public int releaseBuffered(OutputStream out)
      Overrides:
      releaseBuffered in class tools.jackson.core.JsonParser
    • streamReadInputSource

      public Object streamReadInputSource()
      Specified by:
      streamReadInputSource in class tools.jackson.core.JsonParser
    • currentTokenLocation

      public tools.jackson.core.TokenStreamLocation currentTokenLocation()
      Overridden since we do not really have character-based locations, but we do have byte offset to specify.
      Specified by:
      currentTokenLocation in class tools.jackson.core.JsonParser
    • currentLocation

      public tools.jackson.core.TokenStreamLocation currentLocation()
      Overridden since we do not really have character-based locations, but we do have byte offset to specify.
      Specified by:
      currentLocation in class tools.jackson.core.JsonParser
    • currentName

      public String currentName()
      Method that can be called to get the name associated with the current event.
      Specified by:
      currentName in class tools.jackson.core.JsonParser
    • _releaseBuffers

      protected void _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).
      Overrides:
      _releaseBuffers in class tools.jackson.core.base.ParserBase
    • _closeInput

      protected void _closeInput()
      Specified by:
      _closeInput in class tools.jackson.core.base.ParserMinimalBase
    • hasStringCharacters

      public boolean hasStringCharacters()
      Overrides:
      hasStringCharacters in class tools.jackson.core.base.ParserBase
    • nextToken

      public tools.jackson.core.JsonToken nextToken() throws tools.jackson.core.JacksonException
      Specified by:
      nextToken in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • _numberToName

      protected String _numberToName(int ch, boolean neg, CBORParser.TagList tags) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _handleTaggedInt

      protected tools.jackson.core.JsonToken _handleTaggedInt(CBORParser.TagList tags) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _handleTaggedBinary

      protected tools.jackson.core.JsonToken _handleTaggedBinary(CBORParser.TagList tags) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _handleTaggedArray

      protected tools.jackson.core.JsonToken _handleTaggedArray(CBORParser.TagList tags, int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _checkNextIsIntInArray

      protected final boolean _checkNextIsIntInArray(String typeDesc) throws tools.jackson.core.JacksonException
      Heavily simplified method that does a subset of what nextToken() does to basically only (1) determine that we are getting JsonToken.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:
      tools.jackson.core.JacksonException
    • _checkNextIsEndArray

      protected final boolean _checkNextIsEndArray() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • finishToken

      public void finishToken() throws tools.jackson.core.JacksonException
      Method for forcing full read of current token, even if it might otherwise only be read if data is accessed via getString() and similar methods.
      Overrides:
      finishToken in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • nextName

      public boolean nextName(tools.jackson.core.SerializableString str) throws tools.jackson.core.JacksonException
      Overrides:
      nextName in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • nextName

      public String nextName() throws tools.jackson.core.JacksonException
      Overrides:
      nextName in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • nextNameMatch

      public int nextNameMatch(tools.jackson.core.sym.PropertyNameMatcher matcher) throws tools.jackson.core.JacksonException
      Overrides:
      nextNameMatch in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • _nextFieldDecodeAndAdd

      private int _nextFieldDecodeAndAdd(tools.jackson.core.sym.PropertyNameMatcher matcher, int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextNameNonText

      private int _nextNameNonText(tools.jackson.core.sym.PropertyNameMatcher matcher, int ch) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextNameEmpty

      private int _nextNameEmpty(tools.jackson.core.sym.PropertyNameMatcher matcher) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextNameLong

      private int _nextNameLong(tools.jackson.core.sym.PropertyNameMatcher matcher, int lenMarker) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextFieldOptimized

      private final int _nextFieldOptimized(tools.jackson.core.sym.PropertyNameMatcher matcher, int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextFieldFromSymbolsLong

      private final int _nextFieldFromSymbolsLong(tools.jackson.core.sym.PropertyNameMatcher matcher, int len, int q1, int q2) throws tools.jackson.core.JacksonException
      Method for locating names longer than 8 bytes (in UTF-8)
      Throws:
      tools.jackson.core.JacksonException
    • nextStringValue

      public String nextStringValue() throws tools.jackson.core.JacksonException
      Overrides:
      nextStringValue in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • nextIntValue

      public int nextIntValue(int defaultValue) throws tools.jackson.core.JacksonException
      Overrides:
      nextIntValue in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • nextLongValue

      public long nextLongValue(long defaultValue) throws tools.jackson.core.JacksonException
      Overrides:
      nextLongValue in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • nextBooleanValue

      public Boolean nextBooleanValue() throws tools.jackson.core.JacksonException
      Overrides:
      nextBooleanValue in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getString

      public String getString() throws tools.jackson.core.JacksonException
      Method for accessing textual representation of the current event; if no current event (before first call to nextToken(), or after encountering end-of-input), returns null. Method can be called for any event.
      Specified by:
      getString in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringCharacters

      public char[] getStringCharacters() throws tools.jackson.core.JacksonException
      Specified by:
      getStringCharacters in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringLength

      public int getStringLength() throws tools.jackson.core.JacksonException
      Specified by:
      getStringLength in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getStringOffset

      public int getStringOffset() throws tools.jackson.core.JacksonException
      Specified by:
      getStringOffset in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • getValueAsString

      public String getValueAsString() throws tools.jackson.core.JacksonException
      Overrides:
      getValueAsString in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • getValueAsString

      public String getValueAsString(String defaultValue) throws tools.jackson.core.JacksonException
      Overrides:
      getValueAsString in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • getString

      public int getString(Writer writer) throws tools.jackson.core.JacksonException
      Overrides:
      getString in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • getBinaryValue

      public byte[] getBinaryValue(tools.jackson.core.Base64Variant b64variant) throws tools.jackson.core.JacksonException
      Overrides:
      getBinaryValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • getEmbeddedObject

      public Object getEmbeddedObject() throws tools.jackson.core.JacksonException
      Overrides:
      getEmbeddedObject in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • readBinaryValue

      public int readBinaryValue(tools.jackson.core.Base64Variant b64variant, OutputStream out) throws tools.jackson.core.JacksonException
      Overrides:
      readBinaryValue in class tools.jackson.core.JsonParser
      Throws:
      tools.jackson.core.JacksonException
    • _readAndWriteBytes

      private int _readAndWriteBytes(OutputStream out, int total) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _getBinaryFromString

      private final byte[] _getBinaryFromString(tools.jackson.core.Base64Variant variant) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • isUndefined

      public boolean isUndefined()
      Checking whether the current token represents an undefined value (0xF7).

      This method allows distinguishing between real null and undefined, even if CBORReadFeature.READ_UNDEFINED_AS_EMBEDDED_OBJECT is disabled and the token is reported as JsonToken.VALUE_NULL.

      Returns:
      true if current token is an undefined, false otherwise
    • isNaN

      public boolean isNaN()
      Overrides:
      isNaN in class tools.jackson.core.base.ParserBase
    • getNumberValue

      public Number getNumberValue() throws tools.jackson.core.JacksonException
      Overrides:
      getNumberValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • getNumberValueExact

      public final Number getNumberValueExact() throws tools.jackson.core.JacksonException
      Overrides:
      getNumberValueExact in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • getNumberType

      public tools.jackson.core.JsonParser.NumberType getNumberType() throws tools.jackson.core.JacksonException
      Overrides:
      getNumberType in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • getNumberTypeFP

      public tools.jackson.core.JsonParser.NumberTypeFP getNumberTypeFP() throws tools.jackson.core.JacksonException
      Overrides:
      getNumberTypeFP in class tools.jackson.core.base.ParserMinimalBase
      Throws:
      tools.jackson.core.JacksonException
    • getFloatValue

      public float getFloatValue() throws tools.jackson.core.JacksonException
      Overrides:
      getFloatValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • _parseNumericValue

      protected void _parseNumericValue(int expType) throws tools.jackson.core.JacksonException
      Specified by:
      _parseNumericValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • _parseIntValue

      protected int _parseIntValue() throws tools.jackson.core.JacksonException
      Specified by:
      _parseIntValue in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • _checkNumericValue

      protected void _checkNumericValue() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToInt

      protected void convertNumberToInt() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToInt in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToLong

      protected void convertNumberToLong() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToLong in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToBigInteger

      protected void convertNumberToBigInteger() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToBigInteger in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToFloat

      protected void convertNumberToFloat() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToFloat in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToDouble

      protected void convertNumberToDouble() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToDouble in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • convertNumberToBigDecimal

      protected void convertNumberToBigDecimal() throws tools.jackson.core.JacksonException
      Overrides:
      convertNumberToBigDecimal in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.JacksonException
    • _finishToken

      protected void _finishToken() throws tools.jackson.core.JacksonException
      Method called to finish parsing of a token so that token contents are retriable
      Throws:
      tools.jackson.core.JacksonException
    • _finishTextToken

      protected String _finishTextToken(int ch) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishShortText

      private final String _finishShortText(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongText

      private final String _finishLongText(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongTextAscii

      private final int _finishLongTextAscii(int len) throws tools.jackson.core.JacksonException
      Consumes as many ascii chars as possible in a tight loop. Returns the amount of bytes remaining.
      Throws:
      tools.jackson.core.JacksonException
    • _finishChunkedText

      private final void _finishChunkedText() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishChunkedTextAscii

      private final boolean _finishChunkedTextAscii() throws tools.jackson.core.JacksonException
      Reads in a tight loop ASCII text until a non-ASCII char is found. If any, then it returns false to signal the caller that the chunk wasn't finished. The caller will keep adding to the _outBuf at the _outPtr position to finish the current text buffer segment
      Throws:
      tools.jackson.core.JacksonException
    • _loadMoreForChunkIfNeeded

      private final void _loadMoreForChunkIfNeeded() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextByte

      private final int _nextByte() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextChunkedByte

      private final int _nextChunkedByte() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _nextChunkedByte2

      private final int _nextChunkedByte2() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishBytes

      protected byte[] _finishBytes(int len) throws tools.jackson.core.JacksonException
      Helper called to complete reading of binary data ("byte string") in case contents are needed.
      Throws:
      tools.jackson.core.JacksonException
    • _finishChunkedBytes

      protected byte[] _finishChunkedBytes() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _finishLongContiguousBytes

      protected byte[] _finishLongContiguousBytes(int expLen) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodePropertyName

      protected final tools.jackson.core.JsonToken _decodePropertyName() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeContiguousName

      private final String _decodeContiguousName(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeLongerName

      private final String _decodeLongerName(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeChunkedName

      private final String _decodeChunkedName() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeNonStringName

      protected final String _decodeNonStringName(int ch, CBORParser.TagList tags) throws tools.jackson.core.JacksonException
      Method that handles initial token type recognition for token that has to be either PROPERTY_NAME or END_OBJECT.
      Throws:
      tools.jackson.core.JacksonException
    • _findDecodedFromSymbols

      private final String _findDecodedFromSymbols(int len) throws tools.jackson.core.JacksonException
      Helper method for trying to find specified encoded UTF-8 byte sequence from symbol table; if successful avoids actual decoding to String.

      NOTE: caller MUST ensure input buffer has enough content.

      Throws:
      tools.jackson.core.JacksonException
    • _findDecodedLong

      private final String _findDecodedLong(int len, int q1, int q2) throws tools.jackson.core.JacksonException
      Method for locating names longer than 8 bytes (in UTF-8)
      Throws:
      tools.jackson.core.JacksonException
    • _addDecodedToSymbols

      private final String _addDecodedToSymbols(int len, String name)
    • _growArrayTo

      private static int[] _growArrayTo(int[] arr, int minSize)
    • _padQuadForNulls

      private static final int _padQuadForNulls(int firstByte)
    • _skipIncomplete

      protected void _skipIncomplete() throws tools.jackson.core.JacksonException
      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:
      tools.jackson.core.JacksonException
    • _skipChunked

      protected void _skipChunked(int expectedType) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _skipBytesL

      protected void _skipBytesL(long llen) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _skipBytes

      protected void _skipBytes(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeTag

      private final int _decodeTag(int lowBits) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeExplicitLength

      private final int _decodeExplicitLength(int lowBits) throws tools.jackson.core.JacksonException
      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:
      tools.jackson.core.JacksonException
    • _decodeChunkLength

      private int _decodeChunkLength(int expType) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeHalfSizeFloat

      private float _decodeHalfSizeFloat() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode8Bits

      private final int _decode8Bits() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode16Bits

      private final int _decode16Bits() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _slow16

      private final int _slow16() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode32Bits

      private final int _decode32Bits() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _slow32

      private final int _slow32() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decode64Bits

      private final long _decode64Bits() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _slow64

      private final long _slow64() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _long

      private static final long _long(int i1, int i2)
    • _decodeUndefinedValue

      protected tools.jackson.core.JsonToken _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.
    • _decodeSimpleValue

      public tools.jackson.core.JsonToken _decodeSimpleValue(int lowBits, int ch) throws tools.jackson.core.JacksonException
      Helper method that deals with details of decoding unallocated "simple values" and exposing them as expected token.

      Starting with Jackson 2.20, this behavior can be changed by enabling the CBORReadFeature.READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECT feature, in which case simple values are returned as JsonToken.VALUE_EMBEDDED_OBJECT with an embedded CBORSimpleValue instance.

      Throws:
      tools.jackson.core.JacksonException
    • _decodeUTF8_3

      private final int _decodeUTF8_3(int c1) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeChunkedUTF8_3

      private final int _decodeChunkedUTF8_3(int c1) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _decodeUTF8_4

      private final int _decodeUTF8_4(int c) throws tools.jackson.core.JacksonException
      Returns:
      Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
      Throws:
      tools.jackson.core.JacksonException
    • _decodeChunkedUTF8_4

      private final int _decodeChunkedUTF8_4(int c) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • loadMore

      protected boolean loadMore() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • loadMoreGuaranteed

      protected void loadMoreGuaranteed() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _loadToHaveAtLeast

      protected final void _loadToHaveAtLeast(int minAvailable) throws tools.jackson.core.JacksonException
      Helper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessary
      Throws:
      tools.jackson.core.JacksonException
    • _tryToLoadToHaveAtLeast

      protected final boolean _tryToLoadToHaveAtLeast(int minAvailable) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _handleEOF

      protected void _handleEOF() throws tools.jackson.core.exc.StreamReadException
      Overrides:
      _handleEOF in class tools.jackson.core.base.ParserBase
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _eofAsNextToken

      protected tools.jackson.core.JsonToken _eofAsNextToken() throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _invalidToken

      protected void _invalidToken(int ch) throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportUnexpectedBreak

      protected void _reportUnexpectedBreak() throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportInvalidInitial

      protected void _reportInvalidInitial(int mask) throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportInvalidOther

      protected void _reportInvalidOther(int mask) throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportInvalidOther

      protected void _reportInvalidOther(int mask, int ptr) throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportIncompleteBinaryRead

      protected void _reportIncompleteBinaryRead(int expLen, int actLen) throws tools.jackson.core.exc.StreamReadException
      Throws:
      tools.jackson.core.exc.StreamReadException
    • _reportTruncatedUTF8InString

      private String _reportTruncatedUTF8InString(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _reportTruncatedUTF8InName

      private String _reportTruncatedUTF8InName(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _bigPositive

      protected final BigInteger _bigPositive(long l)
    • _bigNegative

      protected final BigInteger _bigNegative(long l)
    • createChildArrayContext

      protected void createChildArrayContext(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • createChildObjectContext

      protected void createChildObjectContext(int len) throws tools.jackson.core.JacksonException
      Throws:
      tools.jackson.core.JacksonException
    • _clearRetainedValues

      protected void _clearRetainedValues()