trait Input extends Any
Represents an abstract source from which a value may be deserialized (read).
Each of the read methods tries to read a value of specified type and may throw an exception
(usually com.avsystem.commons.serialization.GenCodec.ReadFailure) when reading is not successful.
An Input value should be assumed to be stateful. If any of the readX methods have already been called,
the Input instance can no longer be used and MUST be discarded.
In order to ignore the value kept in this Input, skip() MUST be called.
In summary: every Input MUST be fully exhausted by either calling one of the read methods which returns
successful value or by calling skip(). Also, ListInput and ObjectInput instances returned from this
Input must also be fully exhausted on their own.
- Alphabetic
- By Inheritance
- Input
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
getClass(): Class[_]
- Definition Classes
- Any
-
abstract
def
inputType: InputType
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 OFreadObject()andreadMap()can be safely called.
If this method returns InputType.List, then AT LEAST ONE OFreadList()andreadSet()can be safely called.
If this method returns InputType.Simple then AT LEAST ONE OFreadString(),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 thenreadDouble()must be used during reading by the same GenCodec. - abstract def readBinary(): Array[Byte]
- abstract def readBoolean(): Boolean
- abstract def readDouble(): Double
- abstract def readInt(): Int
- abstract def readList(): ListInput
- abstract def readLong(): Long
- abstract def readNull(): Null
- abstract def readObject(): ObjectInput
- abstract def readString(): String
- abstract def skip(): Unit
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
hashCode(): Int
- Definition Classes
- Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def readByte(): Byte
- def readChar(): Char
- def readFloat(): Float
- def readMap(): ObjectInput
- def readSet(): ListInput
- def readShort(): Short
- def readTimestamp(): Long
- def readUnit(): Unit
-
def
toString(): String
- Definition Classes
- Any