Returns the type of the value that can be read from this Input.
Returns the type of the value that can be read from this Input. Only four types can be distinguished (see InputType for more details on this).
If this method returns InputType.Null,
then readNull()
can be safely called.
If this method returns InputType.Object,
then AT LEAST ONE OF readObject()
and readMap()
can be safely called.
If this method returns InputType.List,
then AT LEAST ONE OF readList()
and readSet()
can be safely called.
If this method returns InputType.Simple
then AT LEAST ONE OF readString()
, readChar()
, readBoolean()
,
readByte()
, readShort()
, readInt()
, readLong()
, readTimestamp()
, readFloat()
, readDouble()
,
readBinary()
can be called.
It's impossible to know which of the listed methods is actually safe to call based only on
InputType.
It is the responsibility of GenCodec implementation to have
reading and writing logic consistent.
For example, if writeDouble(Double)
is used during writing then readDouble()
must be used during reading
by the same GenCodec.