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.

Linear Supertypes
Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Input
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getClass(): Class[_]
    Definition Classes
    Any
  2. 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 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.

  3. abstract def readBinary(): Array[Byte]
  4. abstract def readBoolean(): Boolean
  5. abstract def readDouble(): Double
  6. abstract def readInt(): Int
  7. abstract def readList(): ListInput
  8. abstract def readLong(): Long
  9. abstract def readNull(): Null
  10. abstract def readObject(): ObjectInput
  11. abstract def readString(): String
  12. abstract def skip(): Unit

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  6. def hashCode(): Int
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def readByte(): Byte
  9. def readChar(): Char
  10. def readFloat(): Float
  11. def readMap(): ObjectInput
  12. def readSet(): ListInput
  13. def readShort(): Short
  14. def readTimestamp(): Long
  15. def readUnit(): Unit
  16. def toString(): String
    Definition Classes
    Any

Inherited from Any

Ungrouped