t

io.github.vigoo.desert

BinaryInput

trait BinaryInput extends AnyRef

Interface for reading binary data

The low level read operations for primitive types must be implemented.

Also contains some higher level functions such as variable integer decoding and compression support, which have a default implementation based on the primitives.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BinaryInput
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def readByte(): Byte

    Reads one byte from the input

  2. abstract def readBytes(count: Int): Array[Byte]

    Reads N bytes from the input into an array

    Reads N bytes from the input into an array

    count

    Number of bytes to read

  3. abstract def readDouble(): Double

    Reads a 64-bit floating point value from the input

  4. abstract def readFloat(): Float

    Reads a 32-bit floating point value from the input

  5. abstract def readInt(): Int

    Reads a 32-bit integer from the input

  6. abstract def readLong(): Long

    Reads a 64-bit integer from the input

  7. abstract def readShort(): Short

    Reads a 16-bit integer from the input

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def readCompressedByteArray(): Array[Byte]

    Reads a compressed byte array from the input

    Reads a compressed byte array from the input

    It assumes to have two variable-length integer representing the uncompressed and the compressed data length followed by the ZIP-compressed array of bytes. Counterpart of BinaryOutput.writeCompressedByteArray

  15. def readVarInt(optimizeForPositive: Boolean): Int

    Reads a variable-length encoded 32-bit integer from the input

    Reads a variable-length encoded 32-bit integer from the input

    The encoding takes 1-5 bytes.

    Based on https://github.com/EsotericSoftware/kryo/blob/master/src/com/esotericsoftware/kryo/io/ByteBufferInput.java#L366

    optimizeForPositive

    If true, the encoding was optimized for positive integers. This parameter must match the one passed to the BinaryOutput.writeVarInt

  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped