Trait

com.avsystem.commons.serialization

Input

Related Doc: package serialization

Permalink

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 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
Known Subclasses
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[_]

    Permalink
    Definition Classes
    Any
  2. abstract def isNull: Boolean

    Permalink
  3. abstract def readBigDecimal(): BigDecimal

    Permalink
  4. abstract def readBigInt(): BigInt

    Permalink
  5. abstract def readBinary(): Array[Byte]

    Permalink
  6. abstract def readBoolean(): Boolean

    Permalink
  7. abstract def readDouble(): Double

    Permalink
  8. abstract def readInt(): Int

    Permalink
  9. abstract def readList(): ListInput

    Permalink
  10. abstract def readLong(): Long

    Permalink
  11. abstract def readNull(): Null

    Permalink
  12. abstract def readObject(): ObjectInput

    Permalink
  13. abstract def readString(): String

    Permalink
  14. abstract def skip(): Unit

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def legacyOptionEncoding: Boolean

    Permalink

    This ugly workaround has been introduced when standard Option encoding changed from zero-or-one element list encoding to unwrapped-or-null encoding which effectively disallowed serializing null and Some(null).

    This ugly workaround has been introduced when standard Option encoding changed from zero-or-one element list encoding to unwrapped-or-null encoding which effectively disallowed serializing null and Some(null). If some Input implementation still wants to use the list encoding, it may do it by overriding this method and returning true.

  9. def readByte(): Byte

    Permalink
  10. def readChar(): Char

    Permalink
  11. def readFloat(): Float

    Permalink
  12. def readShort(): Short

    Permalink
  13. def readTimestamp(): Long

    Permalink
  14. def readUnit(): Unit

    Permalink
  15. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from Any

Ungrouped