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.
- Alphabetic
- By Inheritance
- BinaryInput
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def readByte(): Byte
Reads one byte from the input
- 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
- abstract def readDouble(): Double
Reads a 64-bit floating point value from the input
- abstract def readFloat(): Float
Reads a 32-bit floating point value from the input
- abstract def readInt(): Int
Reads a 32-bit integer from the input
- abstract def readLong(): Long
Reads a 64-bit integer from the input
- abstract def readShort(): Short
Reads a 16-bit integer from the input
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated