| 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. |
| protected boolean | _closed
Flag that indicates whether parser is closed or not. |
| protected int | |
| protected ProtobufField | |
| protected ProtobufMessage | _currentMessage
The innermost Object type ("message" in proto lingo) we are handling. |
| 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 | _decodedLength
Length of the value that parser points to, for scalar values that use length prefixes (Strings, binary data). |
| 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 int | |
| 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 ProtobufReadContext | _parsingContext
Information about parser context, context in which the next token is to be parsed (root, array, object). |
| protected ProtobufSchema | |
| protected int | _state
Current state of the parser. |
| 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 static final JacksonFeatureSet | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| public | ProtobufParser(IOContext ctxt, int parserFeatures, ObjectCodec codec, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
|
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| protected void | |
| protected void | |
| protected final int | |
| protected final long | |
| private int | |
| private final int | |
| private final int | Returns: Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
|
| private int | |
| protected int | |
| private long | |
| protected long | |
| private final ProtobufField | |
| protected byte[] | |
| private final void | |
| private final String | |
| protected void | |
| protected ByteArrayBuilder | |
| protected void | _handleEOF()
Implements abstract com. Method sub-classes need to implement for verifying that end-of-content is acceptable at current input position. |
| private JsonToken | |
| private JsonToken | |
| 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 |
| protected static final long | |
| private final int | |
| private JsonToken | |
| protected void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| protected void | |
| private JsonToken | |
| private void | |
| protected void | |
| protected void | |
| protected final int | |
| protected final long | |
| public boolean | canUseSchema(FormatSchema
Schema to check schema)Overrides com. Method that can be used to verify that given schema can be used with
this parser (using |
| public void | close()
Implements abstract com. Implements java. Closes the parser so that no further iteration or data access
can be made; will also close the underlying input source
if parser either owns the input source, or feature
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public JsonLocation | currentLocation()
Overrides com. Overridden since we do not really have character-based locations, but we do have byte offset to specify. |
| public String | currentName()
Overrides com. Method that can be called to get the name associated with the current event. |
| public JsonLocation | currentTokenLocation()
Overrides com. Overridden since we do not really have character-based locations, but we do have byte offset to specify. |
| public BigInteger | getBigIntegerValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value. |
| public ObjectCodec | getCodec()
Implements abstract com. Accessor for |
| public JsonLocation | getCurrentLocation()
Implements abstract com.
Deprecated
Deprecated alias for |
| public String | getCurrentName()
Implements abstract com.
Deprecated
Deprecated alias of |
| public BigDecimal | getDecimalValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public double | getDoubleValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public Object | getEmbeddedObject()
Overrides com. Accessor that can be called if (and only if) the current token
is |
| public float | getFloatValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public Object | getInputSource()
Overrides com. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public int | getIntValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public long | getLongValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public JsonParser. | getNumberType()
Implements abstract com. If current token is of type
|
| public JsonParser. | getNumberTypeFP()
Overrides com. If current token is of type
|
| public Number | getNumberValue()
Implements abstract com. Generic number value accessor method that will work for all kinds of numeric values. |
| public final Number | getNumberValueExact()
Overrides com. Method similar to |
| public ProtobufReadContext | getParsingContext()
Implements abstract com. Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information. |
| public JacksonFeatureSet | getReadCapabilities()
Overrides com. Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly). |
| public ProtobufSchema | getSchema()
Overrides com. Method for accessing Schema that this parser uses, if any. |
| public String | getText()
Implements abstract com. Method for accessing textual representation of the current event;
if no current event (before first call to |
| public int | getText(Writer
Writer to write textual content to writer)Overrides com. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getTextCharacters()
Implements abstract com. Method similar to |
| public int | getTextLength()
Implements abstract com. Accessor used with |
| public int | getTextOffset()
Implements abstract com. Accessor used with |
| public JsonLocation | getTokenLocation()
Implements abstract com.
Deprecated
Deprecated alias for |
| public String | getValueAsString()
Overrides com. Method that will try to convert value of current token to a
|
| public String | getValueAsString(String
Default value to return if conversion to defaultValue)String is not possibleOverrides com. Method that will try to convert value of current token to a
|
| public boolean | hasTextCharacters()
Implements abstract com. Method that can be used to determine whether calling of
|
| public boolean | isClosed()
Implements abstract com. Method that can be called to determine whether this parser is closed or not. |
| public boolean | isNaN()
Overrides com. Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). |
| protected final boolean | |
| protected final void | |
| public boolean | nextFieldName(SerializableString
Property name to compare next token to (if next token is
sstr)JsonToken.FIELD_NAME)Overrides com. Method that fetches next token (as if calling |
| public String | nextFieldName()
Overrides com. Method that fetches next token (as if calling |
| public String | nextTextValue()
Overrides com. Method that fetches next token (as if calling |
| public JsonToken | nextToken()
Implements abstract com. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public void | overrideCurrentName(String
Name to use as the current name; may be null. name)Implements abstract com. Method that can be used to change what is considered to be the current (field) name. |
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. Similar to |
| public int | releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to out)Overrides com. Method that can be called to push back any content that has been read but not consumed by the parser. |
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. Setter that allows defining |
| public void | |
| public void | setSchema(FormatSchema
Schema to use schema)Overrides com. Method to call to make this parser use specified schema. |
| public Version | version()
Implements abstract com. Implements com. Accessor for getting version of the core package, given a parser instance. |