@Internal public final class JacksonDecoder extends AbstractChildReuseStreamDecoder
Decoder
interface for Jackson.AbstractStreamDecoder.TokenType, AbstractStreamDecoder.ValueDecoder<R>
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
coerceScalarToString()
Decode any non-null scalar value (number, string or boolean) to its string representation.
|
static Decoder |
create(com.fasterxml.jackson.core.JsonParser parser) |
static Decoder |
create(com.fasterxml.jackson.core.JsonParser parser,
java.lang.Class<?> view) |
protected AbstractStreamDecoder |
createChildDecoder()
Create a new child decoder using
AbstractStreamDecoder(AbstractStreamDecoder) . |
java.io.IOException |
createDeserializationException(java.lang.String message,
java.lang.Object invalidValue)
Creates an exception for the given message.
|
protected AbstractStreamDecoder.TokenType |
currentToken() |
protected java.lang.Number |
getBestNumber()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a Number value. |
protected java.math.BigDecimal |
getBigDecimal()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a BigDecimal value. |
protected java.math.BigInteger |
getBigInteger()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a BigInteger value. |
protected boolean |
getBoolean()
Decode the current
AbstractStreamDecoder.TokenType.BOOLEAN value. |
protected java.lang.String |
getCurrentKey()
Get the current object field name.
|
protected double |
getDouble()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a double value. |
protected int |
getInteger()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a long value. |
protected long |
getLong()
Decode the current
AbstractStreamDecoder.TokenType.NUMBER value as a long value. |
protected void |
nextToken()
Move to the next token.
|
protected void |
skipChildren()
If we are at a
AbstractStreamDecoder.TokenType.START_OBJECT or AbstractStreamDecoder.TokenType.START_ARRAY , skip to the matching
AbstractStreamDecoder.TokenType.END_OBJECT or AbstractStreamDecoder.TokenType.END_ARRAY . |
backFromChild, decodeArbitrary, decodeArray, decodeBigDecimal, decodeBigInteger, decodeBoolean, decodeBuffer, decodeByte, decodeChar, decodeCustom, decodeCustom, decodeDouble, decodeFloat, decodeInt, decodeKey, decodeLong, decodeNull, decodeNumber, decodeObject, decodeShort, decodeString, finishStructure, getBestNumberNode, hasNextArrayValue, skipValue, unexpectedToken
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, decodeArray, decodeObject
public static Decoder create(com.fasterxml.jackson.core.JsonParser parser) throws java.io.IOException
java.io.IOException
public static Decoder create(com.fasterxml.jackson.core.JsonParser parser, java.lang.Class<?> view) throws java.io.IOException
java.io.IOException
public java.io.IOException createDeserializationException(java.lang.String message, java.lang.Object invalidValue)
Decoder
message
- The message, never null
invalidValue
- The invalid value. Can be null
.null
protected AbstractStreamDecoder.TokenType currentToken()
currentToken
in class AbstractStreamDecoder
protected void nextToken() throws java.io.IOException
AbstractStreamDecoder
nextToken
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected java.lang.String getCurrentKey() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.KEY
.getCurrentKey
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected AbstractStreamDecoder createChildDecoder()
AbstractStreamDecoder
AbstractStreamDecoder(AbstractStreamDecoder)
.createChildDecoder
in class AbstractStreamDecoder
protected java.lang.String coerceScalarToString() throws java.io.IOException
AbstractStreamDecoder
coerceScalarToString
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected boolean getBoolean() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.BOOLEAN
value. Called for no other token type.getBoolean
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected long getLong() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a long value. Called for no other token type.getLong
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected int getInteger() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a long value. Called for no other token type.getInteger
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected double getDouble() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a double value. Called for no other token type.getDouble
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected java.math.BigInteger getBigInteger() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a BigInteger
value. Called for no other token type.getBigInteger
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected java.math.BigDecimal getBigDecimal() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a BigDecimal
value. Called for no other token type.getBigDecimal
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected java.lang.Number getBestNumber() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.NUMBER
value as a Number
value. Called for no other token type.getBestNumber
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occursprotected void skipChildren() throws java.io.IOException
AbstractStreamDecoder
AbstractStreamDecoder.TokenType.START_OBJECT
or AbstractStreamDecoder.TokenType.START_ARRAY
, skip to the matching
AbstractStreamDecoder.TokenType.END_OBJECT
or AbstractStreamDecoder.TokenType.END_ARRAY
. Else, do nothing.skipChildren
in class AbstractStreamDecoder
java.io.IOException
- if an unrecoverable error occurs