| Modifier and Type | Class and Description |
|---|---|
| public static enum | CBORParser.Feature
Enumeration that defines all togglable features for CBOR generators. |
| protected static class | CBORParser.StringRefList
Type to keep track of a list of string references. |
| protected static class | CBORParser.StringRefListStack
Type to keep a stack of string refs based on namespaces within the document. |
| public static class | CBORParser.TagList
Class for keeping track of tags in an optimized manner. |
| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | _binaryValue
We will hold on to decoded binary data, for duration of
current event, so that multiple calls to
|
| protected boolean | _bufferRecyclable
Flag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not. |
| protected ByteArrayBuilder | _byteArrayBuilder
ByteArrayBuilder is needed if 'getBinaryValue' is called. |
| private int | _chunkEnd
Helper variables used when dealing with chunked content. |
| private int | _chunkLeft
Helper variables used when dealing with chunked content. |
| protected boolean | _closed
Flag that indicates whether parser is closed or not. |
| protected long | _currInputProcessed
Number of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer). |
| protected int | _currInputRow
Current row location of current point in input buffer, starting from 1, if available. |
| protected int | _currInputRowStart
Current index of the first character of the current row in input buffer. |
| 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. |
| protected int | _inputEnd
Index of character after last available one in the buffer. |
| protected int | _inputPtr
Pointer to next available character in buffer |
| protected InputStream | _inputStream
Input stream that can be used for reading more content, if one in use. |
| protected final IOContext | _ioContext
I/O context for this reader. |
| protected boolean | _nameCopied
Flag set to indicate whether the field name is available from the name copy buffer or not (in addition to its String representation being available via read context) |
| protected char[] | _nameCopyBuffer
Temporary buffer that is needed if field name is accessed
using |
| protected BigDecimal | |
| protected BigInteger | |
| protected double | |
| protected float | |
| protected int | |
| protected long | |
| protected int | _numTypesValid
Bitfield that indicates which numeric representations have been calculated for the current type |
| protected ObjectCodec | _objectCodec
Codec used for data binding when (if) requested. |
| protected int | _quad1
Quads used for hash calculation |
| protected int | _quad2
Quads used for hash calculation |
| protected int | _quad3
Quads used for hash calculation |
| protected int[] | _quadBuffer
Temporary buffer used for name parsing. |
| protected String | _sharedString
Shared string that should be used in place of _textBuffer when a string reference is used. |
| protected CBORReadContext | _streamReadContext
Information about parser context, context in which the next token is to be parsed (root, array, object). |
| protected CBORParser. | _stringRefs
Stack of text and binary string references. |
| protected final ByteQuadsCanonicalizer | _symbols
Symbol table that contains field names encountered so far |
| protected final boolean | _symbolsCanonical
Marker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization. |
| protected CBORParser. | _tagValues
We will keep track of tag values for possible future use. |
| protected final TextBuffer | _textBuffer
Buffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array) |
| protected boolean | _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) |
| protected int | _tokenInputCol
Column on input row that current token starts; 0-based (although in the end it'll be converted to 1-based) |
| protected int | _tokenInputRow
Input row on which current token starts, 1-based |
| protected long | _tokenInputTotal
Total number of bytes/characters read before start of current token. |
| protected int | _typeByte
Type byte of the current token |
| pack-priv static final BigDecimal | |
| pack-priv static final BigDecimal | |
| pack-priv static final BigDecimal | |
| pack-priv static final BigDecimal | |
| pack-priv static final BigInteger | |
| pack-priv static final BigInteger | |
| pack-priv static final BigInteger | |
| pack-priv static final BigInteger | |
| private static final BigInteger | |
| protected static final JacksonFeatureSet | |
| protected static final int | |
| private static final double | |
| private static final double | |
| private static final Charset | |
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| public | CBORParser(IOContext ctxt, int parserFeatures, int cborFeatures, ObjectCodec codec, ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
|
| Modifier and Type | Method and Description |
|---|---|
| private final String | |
| private final BigInteger | |
| private final BigInteger | |
| protected final boolean | |
| protected final boolean | _checkNextIsIntInArray(final String typeDesc)
Heavily simplified method that does a subset of what |
| 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 | |
| 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 void | _decodeNonStringName(int ch, CBORParser.
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT. |
| protected final JsonToken | |
| public 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 | |
| protected 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. |
| private final int | |
| private final int | Returns: Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
|
| protected JsonToken | |
| private final String | _findDecodedFromSymbols(final int len)
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 | |
| 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 | |
| protected byte[] | |
| private final String | |
| private final String | |
| protected String | |
| protected void | |
| private final byte[] | |
| protected ByteArrayBuilder | |
| private static int[] | |
| protected void | _handleEOF()
Implements abstract com. |
| protected JsonToken | |
| protected JsonToken | |
| protected JsonToken | |
| protected 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 | |
| private final int | |
| private final int | |
| private final int | |
| protected String | |
| private static final int | |
| private int | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| private String | _reportTruncatedUTF8InName(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected)
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | _skipIncomplete()
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 | |
| public void | close()
Implements abstract com. Implements java. Feature#AUTO_CLOSE_SOURCE is enabled.
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| private void | |
| private void | |
| public void | finishToken()
Overrides com. getText and similar methods.
|
| public BigInteger | getBigIntegerValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can not be used as a Java long primitive type due to its
magnitude.
|
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. |
| public ObjectCodec | getCodec()
Implements abstract com. ObjectCodec associated with this
parser, if any.
|
| public JsonLocation | getCurrentLocation()
Implements abstract com. |
| public String | getCurrentName()
Implements abstract com. |
| 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. |
| public CBORParser. | 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. |
| public BigDecimal | getDecimalValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT or
JsonToken#VALUE_NUMBER_INT.
|
| public double | getDoubleValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT and
it can be expressed as a Java double primitive type.
|
| public Object | getEmbeddedObject()
Overrides com. JsonToken#VALUE_EMBEDDED_OBJECT.
|
| public float | getFloatValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT and
it can be expressed as a Java float primitive type.
|
| public int | getFormatFeatures()
Overrides com. FormatFeatures, format-specific
on/off configuration settings.
|
| public Object | getInputSource()
Overrides com. InputStream or Reader, depending on what
parser was constructed with.
|
| public int | getIntValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a value of Java int primitive type.
|
| public long | getLongValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a Java long primitive type.
|
| public JsonParser. | getNumberType()
Implements abstract com. JsonToken#VALUE_NUMBER_INT or
JsonToken#VALUE_NUMBER_FLOAT, returns
one of NumberType constants; otherwise returns null.
|
| public Number | getNumberValue()
Implements abstract com. |
| public final Number | getNumberValueExact()
Overrides com. getNumberValue with the difference that
for floating-point numbers value returned may be BigDecimal
if the underlying format does not store floating-point numbers using
native representation: for example, textual formats represent numbers
as Strings (which are 10-based), and conversion to java.
is potentially lossy operation.
|
| public CBORReadContext | getParsingContext()
Implements abstract com. |
| public JacksonFeatureSet | getReadCapabilities()
Overrides com. |
| public String | getText()
Implements abstract com. nextToken, or
after encountering end-of-input), returns null.
|
| public int | |
| public char[] | getTextCharacters()
Implements abstract com. getText, but that will return
underlying (unmodifiable) character array that contains
textual value, instead of constructing a String object
to contain this information.
|
| public int | getTextLength()
Implements abstract com. getTextCharacters, to know length
of String stored in returned buffer.
|
| public int | getTextOffset()
Implements abstract com. getTextCharacters, to know offset
of the first text content character within buffer.
|
| public JsonLocation | getTokenLocation()
Implements abstract com. |
| public String | getValueAsString()
Overrides com. java..
|
| public String | getValueAsString(String
Default value to return if conversion to defaultValue)String is not possibleOverrides com. java..
|
| public boolean | hasTextCharacters()
Implements abstract com. getTextCharacters would be the most efficient
way to access textual content for the event parser currently
points to.
|
| public boolean | isClosed()
Implements abstract com. |
| public boolean | isNaN()
Overrides com. JsonToken#VALUE_NUMBER_FLOAT.
|
| protected boolean | |
| protected void | |
| public Boolean | nextBooleanValue()
Overrides com. nextToken) and
if it is JsonToken#VALUE_TRUE or JsonToken#VALUE_FALSE
returns matching Boolean value; otherwise return null.
|
| public boolean | nextFieldName(SerializableString
Property name to compare next token to (if next token is
str)JsonToken.FIELD_NAME)Overrides com. nextToken) and
verifies whether it is JsonToken#FIELD_NAME with specified name
and returns result of that comparison.
|
| public String | nextFieldName()
Overrides com. nextToken) and
verifies whether it is JsonToken#FIELD_NAME; if it is,
returns same as getCurrentName(), otherwise null.
|
| public int | nextIntValue(int
Value to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTOverrides com. nextToken) and
if it is JsonToken#VALUE_NUMBER_INT returns 32-bit int value;
otherwise returns specified default value
It is functionally equivalent to:
return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public long | nextLongValue(long
Value to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTOverrides com. nextToken) and
if it is JsonToken#VALUE_NUMBER_INT returns 64-bit long value;
otherwise returns specified default value
It is functionally equivalent to:
return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public String | nextTextValue()
Overrides com. nextToken) and
if it is JsonToken#VALUE_STRING returns contained String value;
otherwise returns null.
|
| public JsonToken | nextToken()
Implements abstract com. |
| public void | overrideCurrentName(String
Name to use as the current name; may be null. name)Implements abstract com. |
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. readBinaryValue(OutputStream) but allows explicitly
specifying base64 variant to use.
|
| public int | releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to out)Overrides com. |
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. ObjectCodec associated with this
parser, if any.
|
| public StreamReadConstraints | streamReadConstraints()
Overrides com. |
| public Version | version()
Implements abstract com. Implements com. |