| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | |
| protected ByteArrayBuilder | |
| protected final Object | _inputSource
Although most massaging is done later, caller may be interested in the ultimate source. |
| protected JavaPropsSchema | _schema
Schema we use for parsing Properties into structure of some kind. |
| protected final Map | _sourceContent
Actual |
| protected JPropReadContext | |
| protected static final JavaPropsSchema | |
| protected static final JacksonFeatureSet | STREAM_READ_CAPABILITIES
Properties capabilities slightly different from defaults, having untyped (text-only) scalars. |
| Access | Constructor and Description |
|---|---|
| public | JavaPropsParser(ObjectReadContext readCtxt, IOContext ioCtxt, int parserFeatures, JavaPropsSchema schema, Object inputSource, Map<?, ?> sourceMap)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | _closeInput()
Implements abstract tools. Abstract method for sub-classes to implement; to be called by
|
| public ByteArrayBuilder | |
| protected void | _handleEOF()
Implements abstract tools. Method sub-classes need to implement to check whether end-of-content is allowed at the current decoding position: formats often want to verify the all start/end token pairs match, for example. |
| protected <T> T | |
| protected void | _releaseBuffers()
Implements abstract tools. Method called to release internal buffers owned by the base reader. |
| public void | assignCurrentValue(Object v)
Implements abstract tools. Helper method, usually equivalent to:
|
| public boolean | canReadObjectId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Object Ids natively (many do not; for example, JSON doesn't). |
| public boolean | canReadTypeId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Type Ids natively (many do not; for example, JSON doesn't). |
| public TokenStreamLocation | currentLocation()
Implements abstract tools. Method that returns location of the last processed character; usually for error reporting purposes. |
| public String | currentName()
Implements abstract tools. Method that can be called to get the name associated with
the current token: for |
| public TokenStreamLocation | currentTokenLocation()
Implements abstract tools. Method that return the starting location of the current token; that is, position of the first character from input that starts the current token. |
| public Object | currentValue()
Implements abstract tools. Helper method, usually equivalent to:
Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality. |
| public BigInteger | getBigIntegerValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public byte[] | getBinaryValue(Base64Variant variant)
Implements abstract tools. 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 BigDecimal | getDecimalValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public double | getDoubleValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public Object | getEmbeddedObject()
Overrides tools. Accessor that can be called if (and only if) the current token
is |
| public float | getFloatValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public int | getIntValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public long | getLongValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public JsonParser. | getNumberType()
Implements abstract tools. If current token is of type
|
| public Number | getNumberValue()
Implements abstract tools. Generic number value accessor method that will work for all kinds of numeric values. |
| public JavaPropsSchema | getSchema()
Overrides tools. Method for accessing Schema that this parser uses, if any. |
| public String | getString()
Implements abstract tools. Method for accessing textual representation of the current token;
if no current token (before first call to |
| public int | getString(Writer writer)
Overrides tools. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getStringCharacters()
Implements abstract tools. Method similar to |
| public int | getStringLength()
Implements abstract tools. Accessor used with |
| public int | getStringOffset()
Implements abstract tools. Accessor used with |
| public boolean | hasStringCharacters()
Implements abstract tools. Method that can be used to determine whether calling of
|
| public boolean | isNaN()
Implements abstract tools. Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). |
| public JsonToken | nextToken()
Implements abstract tools. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public JacksonFeatureSet | streamReadCapabilities()
Overrides tools. Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly). |
| public TokenStreamContext | streamReadContext()
Implements abstract tools. 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 Object | streamReadInputSource()
Implements abstract tools. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public Version | version()
Implements abstract tools. Implements tools. Accessor for getting version of the core package, given a parser instance. |
| _binaryValue | back to summary |
|---|---|
| protected byte[] _binaryValue | |
| _byteArrayBuilder | back to summary |
|---|---|
| protected ByteArrayBuilder _byteArrayBuilder | |
| _inputSource | back to summary |
|---|---|
| protected final Object _inputSource Although most massaging is done later, caller may be interested in the ultimate source. | |
| _schema | back to summary |
|---|---|
| protected JavaPropsSchema _schema Schema we use for parsing Properties into structure of some kind. | |
| _sourceContent | back to summary |
|---|---|
| protected final Map<?, ?> _sourceContent Actual | |
| _streamReadContext | back to summary |
|---|---|
| protected JPropReadContext _streamReadContext | |
| DEFAULT_SCHEMA | back to summary |
|---|---|
| protected static final JavaPropsSchema DEFAULT_SCHEMA | |
| STREAM_READ_CAPABILITIES | back to summary |
|---|---|
| protected static final JacksonFeatureSet<StreamReadCapability> STREAM_READ_CAPABILITIES Properties capabilities slightly different from defaults, having untyped (text-only) scalars. | |
| JavaPropsParser | back to summary |
|---|---|
| public JavaPropsParser(ObjectReadContext readCtxt, IOContext ioCtxt, int parserFeatures, JavaPropsSchema schema, Object inputSource, Map<?, ?> sourceMap) | |
| _closeInput | back to summary |
|---|---|
| protected void _closeInput() throws IOException Implements abstract tools. Doc from tools. Abstract method for sub-classes to implement; to be called by
| |
| _getByteArrayBuilder | back to summary |
|---|---|
| public ByteArrayBuilder _getByteArrayBuilder() | |
| _handleEOF | back to summary |
|---|---|
| protected void _handleEOF() throws StreamReadException Implements abstract tools. Doc from tools. Method sub-classes need to implement to check whether end-of-content is allowed at the current decoding position: formats often want to verify the all start/end token pairs match, for example.
| |
| _noNumbers | back to summary |
|---|---|
| protected <T> T _noNumbers() throws StreamReadException | |
| _releaseBuffers | back to summary |
|---|---|
| protected void _releaseBuffers() Implements abstract tools. Doc from tools. Method called to release internal buffers owned by the base
reader. This is expected to be called after
| |
| assignCurrentValue | back to summary |
|---|---|
| public void assignCurrentValue(Object v) Implements abstract tools. Doc from tools. Helper method, usually equivalent to:
| |
| canReadObjectId | back to summary |
|---|---|
| public boolean canReadObjectId() Overrides tools. Doc from tools. Introspection method that may be called to see if the underlying data format supports some kind of Object Ids natively (many do not; for example, JSON doesn't). Default implementation returns true; overridden by data formats that do support native Object Ids. Caller is expected to either use a non-native notation (explicit property or such), or fail, in case it cannot use native object ids.
| |
| canReadTypeId | back to summary |
|---|---|
| public boolean canReadTypeId() Overrides tools. Doc from tools. Introspection method that may be called to see if the underlying data format supports some kind of Type Ids natively (many do not; for example, JSON doesn't). Default implementation returns true; overridden by data formats that do support native Type Ids. Caller is expected to either use a non-native notation (explicit property or such), or fail, in case it cannot use native type ids.
| |
| currentLocation | back to summary |
|---|---|
| public TokenStreamLocation currentLocation() Implements abstract tools. Doc from tools. Method that returns location of the last processed character; usually for error reporting purposes.
Note that the location is not guaranteed to be accurate (although most
implementation will try their best): some implementations may only
report specific boundary locations (start or end locations of tokens)
and others only return
| |
| currentName | back to summary |
|---|---|
| public String currentName() Implements abstract tools. Doc from tools. Method that can be called to get the name associated with
the current token: for
| |
| currentTokenLocation | back to summary |
|---|---|
| public TokenStreamLocation currentTokenLocation() Implements abstract tools. Doc from tools. Method that return the starting location of the current token; that is, position of the first character from input that starts the current token.
Note that the location is not guaranteed to be accurate (although most
implementation will try their best): some implementations may only
return
| |
| currentValue | back to summary |
|---|---|
| public Object currentValue() Implements abstract tools. Doc from tools. Helper method, usually equivalent to:
Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.
| |
| getBigIntegerValue | back to summary |
|---|---|
| public BigInteger getBigIntegerValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type
| |
| getBinaryValue | back to summary |
|---|---|
| public byte[] getBinaryValue(Base64Variant variant) throws JacksonException Implements abstract tools. Doc from tools. 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.
It works similar to getting String value via Note that non-decoded textual contents of the current token are not guaranteed to be accessible after this method is called. Current implementation, for example, clears up textual content during decoding. Decoded binary content, however, will be retained until parser is advanced to the next event.
| |
| getDecimalValue | back to summary |
|---|---|
| public BigDecimal getDecimalValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type
| |
| getDoubleValue | back to summary |
|---|---|
| public double getDoubleValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type Note if the value falls
outside of range of Java double, a
| |
| getEmbeddedObject | back to summary |
|---|---|
| public Object getEmbeddedObject() throws JacksonException Overrides tools. Doc from tools. Accessor that can be called if (and only if) the current token
is Note only some specialized parser implementations support
embedding of objects (usually ones that are facades on top
of non-streaming sources, such as object trees). One exception
is access to binary content (whether via base64 encoding or not)
which typically is accessible using this method, as well as
| |
| getFloatValue | back to summary |
|---|---|
| public float getFloatValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type Note if the value falls
outside of range of Java float, a
| |
| getIntValue | back to summary |
|---|---|
| public int getIntValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type Note if the resulting integer value falls outside range of
Java
| |
| getLongValue | back to summary |
|---|---|
| public long getLongValue() throws JacksonException Implements abstract tools. Doc from tools. Numeric accessor that can be called when the current
token is of type Note if the token is an integer, but its value falls
outside of range of Java long, a
| |
| getNumberType | back to summary |
|---|---|
| public JsonParser. Implements abstract tools. Doc from tools. If current token is of type
Note in Jackson 2.x, an exception was wrong if called for non-numeric token.
| |
| getNumberValue | back to summary |
|---|---|
| public Number getNumberValue() throws JacksonException Implements abstract tools. Doc from tools. Generic number value accessor method that will work for all kinds of numeric values. It will return the optimal (simplest/smallest possible) wrapper object that can express the numeric value just parsed.
| |
| getSchema | back to summary |
|---|---|
| public JavaPropsSchema getSchema() Overrides tools. Doc from tools. Method for accessing Schema that this parser uses, if any. Default implementation returns null.
| |
| getString | back to summary |
|---|---|
| public String getString() throws JacksonException Implements abstract tools. Doc from tools. Method for accessing textual representation of the current token;
if no current token (before first call to
| |
| getString | back to summary |
|---|---|
| public int getString(Writer writer) throws JacksonException Overrides tools. Doc from tools. Method to read the textual representation of the current token in chunks and pass it to the given Writer. Functionally same as calling: writer.write(parser.getString());but should typically be more efficient as longer content does need to be combined into a single String to return, and write
can occur directly from intermediate buffers Jackson uses.Note String value will still be buffered (usually
using Note In Jackson 2.x this method was called
| |
| getStringCharacters | back to summary |
|---|---|
| public char[] getStringCharacters() throws JacksonException Implements abstract tools. Doc from tools. Method similar to
Note that caller MUST NOT modify the returned character array in any way -- doing so may corrupt current parser state and render parser instance useless.
The only reason to call this method (over
| |
| getStringLength | back to summary |
|---|---|
| public int getStringLength() throws JacksonException Implements abstract tools. Doc from tools. Accessor used with
| |
| getStringOffset | back to summary |
|---|---|
| public int getStringOffset() throws JacksonException Implements abstract tools. Doc from tools. Accessor used with
| |
| hasStringCharacters | back to summary |
|---|---|
| public boolean hasStringCharacters() Implements abstract tools. Doc from tools. Method that can be used to determine whether calling of
| |
| isNaN | back to summary |
|---|---|
| public boolean isNaN() Implements abstract tools. Doc from tools. Accessor for checking whether current token is a special
"not-a-number" (NaN) token (including both "NaN" AND
positive/negative infinity!). These values are not supported by all formats:
JSON, for example, only supports them if
Note in case where numeric value is outside range of requested type --
most notably
| |
| nextToken | back to summary |
|---|---|
| public JsonToken nextToken() throws JacksonException Implements abstract tools. Doc from tools. Main iteration method, which will advance stream enough to determine type of the next token, if any. If none remaining (stream has no content other than possible white space before ending), null will be returned.
| |
| streamReadCapabilities | back to summary |
|---|---|
| public JacksonFeatureSet Overrides tools. Doc from tools. Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly).
| |
| streamReadContext | back to summary |
|---|---|
| public TokenStreamContext streamReadContext() Implements abstract tools. Doc from tools. 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. Contexts are hierarchically nested, and can be used for example for figuring out part of the input document that correspond to specific array or object (for highlighting purposes, or error reporting). Contexts can also be used for simple xpath-like matching of input, if so desired. Note method was called
| |
| streamReadInputSource | back to summary |
|---|---|
| public Object streamReadInputSource() Implements abstract tools. Doc from tools. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
In general use of this accessor should be considered as "last effort", i.e. only used if no other mechanism is applicable. Note was named
| |
| version | back to summary |
|---|---|
| public Version version() Implements abstract tools. Implements tools. Doc from tools. Accessor for getting version of the core package, given a parser instance. Left for sub-classes to implement.
| |