public final class CBORParser
extends com.fasterxml.jackson.core.base.ParserMinimalBase
| Modifier and Type | Class and Description | 
|---|---|
| static class  | CBORParser.FeatureEnumeration that defines all togglable features for CBOR generators. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected byte[] | _binaryValueWe will hold on to decoded binary data, for duration of
 current event, so that multiple calls to
  getBinaryValue(com.fasterxml.jackson.core.Base64Variant)will not need to decode data more
 than once. | 
| protected boolean | _bufferRecyclableFlag 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 | _byteArrayBuilderByteArrayBuilder is needed if 'getBinaryValue' is called. | 
| protected boolean | _closedFlag that indicates whether parser is closed or not. | 
| protected long | _currInputProcessedNumber of characters/bytes that were contained in previous blocks
 (blocks that were already processed prior to the current buffer). | 
| protected int | _currInputRowCurrent row location of current point in input buffer, starting
 from 1, if available. | 
| protected int | _currInputRowStartCurrent index of the first character of the current row in input
 buffer. | 
| 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. | 
| protected int | _inputEndIndex of character after last available one in the buffer. | 
| protected int | _inputPtrPointer to next available character in buffer | 
| protected InputStream | _inputStreamInput stream that can be used for reading more content, if one
 in use. | 
| protected com.fasterxml.jackson.core.io.IOContext | _ioContextI/O context for this reader. | 
| 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) | 
| protected char[] | _nameCopyBufferTemporary buffer that is needed if field name is accessed
 using  getTextCharacters()method (instead of String
 returning alternatives) | 
| protected BigDecimal | _numberBigDecimal | 
| protected BigInteger | _numberBigInt | 
| protected double | _numberDouble | 
| protected float | _numberFloat | 
| protected int | _numberInt | 
| protected long | _numberLong | 
| protected int | _numTypesValidBitfield that indicates which numeric representations
 have been calculated for the current type | 
| protected com.fasterxml.jackson.core.ObjectCodec | _objectCodecCodec used for data binding when (if) requested. | 
| protected CBORReadContext | _parsingContextInformation about parser context, context in which
 the next token is to be parsed (root, array, object). | 
| protected int | _quad1Quads used for hash calculation | 
| protected int | _quad2Quads used for hash calculation | 
| protected int | _quad3Quads used for hash calculation | 
| protected int[] | _quadBufferTemporary buffer used for name parsing. | 
| protected com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer | _symbolsSymbol table that contains field names encountered so far | 
| protected int | _tagValueWe will keep track of tag value for possible future use. | 
| protected 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) | 
| 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) | 
| protected int | _tokenInputColColumn on input row that current token starts; 0-based (although
 in the end it'll be converted to 1-based) | 
| protected int | _tokenInputRowInput row on which current token starts, 1-based | 
| protected long | _tokenInputTotalTotal number of bytes/characters read before start of current token. | 
| protected int | _typeByteType byte of the current token | 
| protected static char | CHAR_NULL | 
| protected static int | INT_0 | 
| protected static int | INT_9 | 
| protected static int | INT_MINUS | 
| protected static int | INT_PLUS | 
| protected static int | NR_BIGDECIMAL | 
| protected static int | NR_BIGINT | 
| protected static int | NR_DOUBLE | 
| protected static int | NR_FLOAT | 
| protected static int | NR_INT | 
| protected static int | NR_LONG | 
| protected static int | NR_UNKNOWN | 
| Constructor and Description | 
|---|
| 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) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | _checkNumericValue(int expType) | 
| protected void | _closeInput() | 
| protected com.fasterxml.jackson.core.JsonToken | _decodeFieldName() | 
| protected void | _decodeNonStringName(int ch)Method that handles initial token type recognition for token
 that has to be either FIELD_NAME or END_OBJECT. | 
| protected byte[] | _finishBytes(int len) | 
| protected String | _finishTextToken(int ch) | 
| protected void | _finishToken()Method called to finish parsing of a token so that token contents
 are retriable | 
| protected com.fasterxml.jackson.core.util.ByteArrayBuilder | _getByteArrayBuilder() | 
| protected com.fasterxml.jackson.core.JsonToken | _handleCBOREOF() | 
| protected void | _handleEOF() | 
| 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 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 | 
| protected String | _numberToName(int ch,
             boolean neg) | 
| protected void | _releaseBuffers()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 | _reportUnexpectedBreak() | 
| protected void | _skipBytes(int len) | 
| protected void | _skipBytesL(long llen) | 
| protected void | _skipChunked(int expectedType) | 
| protected void | _skipIncomplete()Method called to skip remainders of an incomplete token, when
 contents themselves will not be needed any more. | 
| void | close() | 
| protected void | convertNumberToBigDecimal() | 
| protected void | convertNumberToBigInteger() | 
| protected void | convertNumberToDouble() | 
| protected void | convertNumberToFloat() | 
| protected void | convertNumberToInt() | 
| protected void | convertNumberToLong() | 
| void | finishToken()Method for forcing full read of current token, even if it might otherwise
 only be read if data is accessed via  getText()and similar methods. | 
| BigInteger | getBigIntegerValue() | 
| byte[] | getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) | 
| com.fasterxml.jackson.core.ObjectCodec | getCodec() | 
| com.fasterxml.jackson.core.JsonLocation | getCurrentLocation()Overridden since we do not really have character-based locations,
 but we do have byte offset to specify. | 
| String | getCurrentName()Method that can be called to get the name associated with
 the current event. | 
| 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. | 
| BigDecimal | getDecimalValue() | 
| double | getDoubleValue() | 
| Object | getEmbeddedObject() | 
| float | getFloatValue() | 
| int | getFormatFeatures() | 
| Object | getInputSource() | 
| int | getIntValue() | 
| long | getLongValue() | 
| com.fasterxml.jackson.core.JsonParser.NumberType | getNumberType() | 
| Number | getNumberValue() | 
| CBORReadContext | getParsingContext() | 
| String | getText()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 | getText(Writer writer) | 
| char[] | getTextCharacters() | 
| int | getTextLength() | 
| int | getTextOffset() | 
| com.fasterxml.jackson.core.JsonLocation | getTokenLocation()Overridden since we do not really have character-based locations,
 but we do have byte offset to specify. | 
| String | getValueAsString() | 
| String | getValueAsString(String defaultValue) | 
| boolean | hasTextCharacters() | 
| boolean | isClosed() | 
| protected boolean | loadMore() | 
| protected void | loadMoreGuaranteed() | 
| Boolean | nextBooleanValue() | 
| String | nextFieldName() | 
| boolean | nextFieldName(com.fasterxml.jackson.core.SerializableString str) | 
| int | nextIntValue(int defaultValue) | 
| long | nextLongValue(long defaultValue) | 
| String | nextTextValue() | 
| com.fasterxml.jackson.core.JsonToken | nextToken() | 
| void | overrideCurrentName(String name) | 
| int | readBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant,
               OutputStream out) | 
| int | releaseBuffered(OutputStream out) | 
| protected void | reportOverflowInt() | 
| protected void | reportOverflowLong() | 
| void | setCodec(com.fasterxml.jackson.core.ObjectCodec c) | 
| com.fasterxml.jackson.core.Version | version() | 
_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _handleUnrecognizedCharacterEscape, _hasTextualNull, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _throwUnquotedSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, hasCurrentToken, hasToken, hasTokenId, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, skipChildren_codec, _constructError, _reportUnsupportedOperation, canReadObjectId, canReadTypeId, canUseSchema, configure, disable, enable, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getFeatureMask, getObjectId, getSchema, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, overrideFormatFeatures, overrideStdFeatures, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, requiresCustomCodec, setCurrentValue, setFeatureMask, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchemaprotected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected final com.fasterxml.jackson.core.io.IOContext _ioContext
protected boolean _closed
close()) or when end-of-input is reached.protected int _inputPtr
protected int _inputEnd
protected long _currInputProcessed
protected int _currInputRow
protected int _currInputRowStart
protected long _tokenInputTotal
protected int _tokenInputRow
protected int _tokenInputCol
protected CBORReadContext _parsingContext
protected final com.fasterxml.jackson.core.util.TextBuffer _textBuffer
protected char[] _nameCopyBuffer
getTextCharacters() method (instead of String
 returning alternatives)protected boolean _nameCopied
protected com.fasterxml.jackson.core.util.ByteArrayBuilder _byteArrayBuilder
protected byte[] _binaryValue
getBinaryValue(com.fasterxml.jackson.core.Base64Variant) will not need to decode data more
 than once.protected int _tagValue
protected InputStream _inputStream
protected byte[] _inputBuffer
protected boolean _bufferRecyclable
If it is not, it also means that parser can NOT modify underlying buffer.
protected boolean _tokenIncomplete
protected int _typeByte
protected final com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer _symbols
protected int[] _quadBuffer
protected int _quad1
protected int _quad2
protected int _quad3
protected static final int NR_UNKNOWN
protected static final int NR_INT
protected static final int NR_LONG
protected static final int NR_BIGINT
protected static final int NR_FLOAT
protected static final int NR_DOUBLE
protected static final int NR_BIGDECIMAL
protected static final int INT_0
protected static final int INT_9
protected static final int INT_MINUS
protected static final int INT_PLUS
protected static final char CHAR_NULL
protected int _numTypesValid
protected int _numberInt
protected long _numberLong
protected float _numberFloat
protected double _numberDouble
protected BigInteger _numberBigInt
protected BigDecimal _numberBigDecimal
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)
public com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec in class com.fasterxml.jackson.core.JsonParserpublic void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec in class com.fasterxml.jackson.core.JsonParserpublic com.fasterxml.jackson.core.Version version()
version in interface com.fasterxml.jackson.core.Versionedversion in class com.fasterxml.jackson.core.JsonParserpublic int getFormatFeatures()
getFormatFeatures in class com.fasterxml.jackson.core.JsonParserpublic int getCurrentTag()
public int releaseBuffered(OutputStream out) throws IOException
releaseBuffered in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic Object getInputSource()
getInputSource in class com.fasterxml.jackson.core.JsonParserpublic com.fasterxml.jackson.core.JsonLocation getTokenLocation()
getTokenLocation in class com.fasterxml.jackson.core.JsonParserpublic com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
getCurrentLocation in class com.fasterxml.jackson.core.JsonParserpublic String getCurrentName() throws IOException
getCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic void overrideCurrentName(String name)
overrideCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBasepublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic boolean isClosed()
isClosed in class com.fasterxml.jackson.core.base.ParserMinimalBasepublic CBORReadContext getParsingContext()
getParsingContext in class com.fasterxml.jackson.core.base.ParserMinimalBasepublic boolean hasTextCharacters()
hasTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBaseprotected void _releaseBuffers()
                        throws IOException
_closeInput() (for
 example, when explicitly closing this reader instance), or
 separately (if need be).IOExceptionpublic com.fasterxml.jackson.core.JsonToken nextToken()
                                               throws IOException
nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionprotected String _numberToName(int ch, boolean neg) throws IOException
IOExceptionprotected com.fasterxml.jackson.core.JsonToken _handleTaggedBinary(int tag)
                                                            throws IOException
IOExceptionprotected com.fasterxml.jackson.core.JsonToken _handleTaggedArray(int tag,
                                                      int len)
                                                           throws IOException
IOExceptionpublic void finishToken()
                 throws IOException
getText() and similar methods.finishToken in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic boolean nextFieldName(com.fasterxml.jackson.core.SerializableString str)
                      throws IOException
nextFieldName in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic String nextFieldName() throws IOException
nextFieldName in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic String nextTextValue() throws IOException
nextTextValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic int nextIntValue(int defaultValue)
                 throws IOException
nextIntValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic long nextLongValue(long defaultValue)
                   throws IOException
nextLongValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic Boolean nextBooleanValue() throws IOException
nextBooleanValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic String getText() throws IOException
nextToken(), or
 after encountering end-of-input), returns null.
 Method can be called for any event.getText in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic char[] getTextCharacters()
                         throws IOException
getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getTextLength()
                  throws IOException
getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getTextOffset()
                  throws IOException
getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic String getValueAsString() throws IOException
getValueAsString in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic String getValueAsString(String defaultValue) throws IOException
getValueAsString in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getText(Writer writer) throws IOException
getText in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
                      throws IOException
getBinaryValue in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic Object getEmbeddedObject() throws IOException
getEmbeddedObject in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic int readBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant,
                  OutputStream out)
                    throws IOException
readBinaryValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic Number getNumberValue() throws IOException
getNumberValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
                                                               throws IOException
getNumberType in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic int getIntValue()
                throws IOException
getIntValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic long getLongValue()
                  throws IOException
getLongValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic BigInteger getBigIntegerValue() throws IOException
getBigIntegerValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic float getFloatValue()
                    throws IOException
getFloatValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic double getDoubleValue()
                      throws IOException
getDoubleValue in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic BigDecimal getDecimalValue() throws IOException
getDecimalValue in class com.fasterxml.jackson.core.JsonParserIOExceptionprotected void _checkNumericValue(int expType)
                           throws IOException
IOExceptionprotected void convertNumberToInt()
                           throws IOException
IOExceptionprotected void convertNumberToLong()
                            throws IOException
IOExceptionprotected void convertNumberToBigInteger()
                                  throws IOException
IOExceptionprotected void convertNumberToFloat()
                             throws IOException
IOExceptionprotected void convertNumberToDouble()
                              throws IOException
IOExceptionprotected void convertNumberToBigDecimal()
                                  throws IOException
IOExceptionprotected void reportOverflowInt()
                          throws IOException
IOExceptionprotected void reportOverflowLong()
                           throws IOException
IOExceptionprotected void _finishToken()
                     throws IOException
IOExceptionprotected String _finishTextToken(int ch) throws IOException
IOExceptionprotected byte[] _finishBytes(int len)
                       throws IOException
IOExceptionprotected final com.fasterxml.jackson.core.JsonToken _decodeFieldName()
                                                               throws IOException
IOExceptionprotected final void _decodeNonStringName(int ch)
                                   throws IOException
IOExceptionprotected void _skipIncomplete()
                        throws IOException
IOExceptionprotected void _skipChunked(int expectedType)
                     throws IOException
IOExceptionprotected void _skipBytesL(long llen)
                    throws IOException
IOExceptionprotected void _skipBytes(int len)
                   throws IOException
IOExceptionprotected final boolean loadMore()
                          throws IOException
IOExceptionprotected final void loadMoreGuaranteed()
                                 throws IOException
IOExceptionprotected final void _loadToHaveAtLeast(int minAvailable)
                                 throws IOException
IOExceptionprotected com.fasterxml.jackson.core.util.ByteArrayBuilder _getByteArrayBuilder()
protected void _closeInput()
                    throws IOException
IOExceptionprotected void _handleEOF()
                   throws com.fasterxml.jackson.core.JsonParseException
_handleEOF in class com.fasterxml.jackson.core.base.ParserMinimalBasecom.fasterxml.jackson.core.JsonParseExceptionprotected com.fasterxml.jackson.core.JsonToken _handleCBOREOF()
                                                       throws IOException
IOExceptionprotected void _invalidToken(int ch)
                      throws com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.JsonParseExceptionprotected void _reportUnexpectedBreak()
                               throws IOException
IOExceptionprotected void _reportInvalidChar(int c)
                           throws com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.JsonParseExceptionprotected void _reportInvalidInitial(int mask)
                              throws com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.JsonParseExceptionprotected void _reportInvalidOther(int mask)
                            throws com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.JsonParseExceptionprotected void _reportInvalidOther(int mask,
                       int ptr)
                            throws com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.JsonParseExceptionCopyright © 2016 FasterXML. All rights reserved.