JavaStreamBinaryInput

io.github.vigoo.desert.internal.JavaStreamBinaryInput
class JavaStreamBinaryInput(stream: InputStream) extends BinaryInput

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

final override def readByte(): Byte

Reads one byte from the input

Reads one byte from the input

Attributes

Definition Classes
final override def readBytes(count: Int): Array[Byte]

Reads N bytes from the input into an array

Reads N bytes from the input into an array

Attributes

count

Number of bytes to read

Definition Classes
override def readDouble(): Double

Reads a 64-bit floating point value from the input

Reads a 64-bit floating point value from the input

Attributes

Definition Classes
override def readFloat(): Float

Reads a 32-bit floating point value from the input

Reads a 32-bit floating point value from the input

Attributes

Definition Classes
final override def readInt(): Int

Reads a 32-bit integer from the input

Reads a 32-bit integer from the input

Attributes

Definition Classes
final override def readLong(): Long

Reads a 64-bit integer from the input

Reads a 64-bit integer from the input

Attributes

Definition Classes
final override def readShort(): Short

Reads a 16-bit integer from the input

Reads a 16-bit integer from the input

Attributes

Definition Classes

Inherited methods

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

Attributes

Inherited from:
BinaryInput
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

Attributes

optimizeForPositive

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

Inherited from:
BinaryInput