JavaStreamBinaryOutput

io.github.vigoo.desert.internal.JavaStreamBinaryOutput
final class JavaStreamBinaryOutput(stream: OutputStream) extends BinaryOutput

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def writeByte(value: Byte): Unit

Writes one byte

Writes one byte

Attributes

value

The value to write

Definition Classes
override def writeBytes(value: Array[Byte]): Unit

Writes an array of bytes (without writing any information about the number of bytes)

Writes an array of bytes (without writing any information about the number of bytes)

Attributes

value

The bytes to write

Definition Classes
override def writeBytes(value: Array[Byte], start: Int, count: Int): Unit

Writes a slice of an array of bytes (without writing any infomation about the number of bytes)

Writes a slice of an array of bytes (without writing any infomation about the number of bytes)

Attributes

count

Number of bytes to write

start

Index of the first byte to write

value

The byte array

Definition Classes
override def writeDouble(value: Double): Unit

Writes one 64-bit floating point value

Writes one 64-bit floating point value

Attributes

value

The value to write

Definition Classes
override def writeFloat(value: Float): Unit

Writes one 32-bit floating point value

Writes one 32-bit floating point value

Attributes

value

The value to write

Definition Classes
override def writeInt(value: Int): Unit

Writes one 32-bit integer

Writes one 32-bit integer

Attributes

value

The value to write

Definition Classes
override def writeLong(value: Long): Unit

Writes one 64-bit integer

Writes one 64-bit integer

Attributes

value

The value to write

Definition Classes
override def writeShort(value: Short): Unit

Writes one 16-bit integer

Writes one 16-bit integer

Attributes

value

The value to write

Definition Classes

Inherited methods

def writeCompressedByteArray(uncompressedData: Array[Byte], level: Int): Unit

Compress the given byte array with ZIP and write write the compressed data to the output

Compress the given byte array with ZIP and write write the compressed data to the output

The compressed data is prepended with the uncompressed and the compressed data sizes, encoded with variable-length integer encoding.

Use the BinaryInput.readCompressedByteArray function to read it back.

Attributes

level

Compression level. Use constants from the Deflater class

uncompressedData

Uncompressed data

Inherited from:
BinaryOutput
def writeVarInt(value: Int, optimizeForPositive: Boolean): Unit

Writes a 32-bit integer with a variable-length encoding

Writes a 32-bit integer with a variable-length encoding

The number of encoded bytes is 1-5. Based on https://github.com/EsotericSoftware/kryo/blob/master/src/com/esotericsoftware/kryo/io/ByteBufferOutput.java#L290

Attributes

optimizeForPositive

If true the encoding is optimized for positive numbers

value

The value to write

Inherited from:
BinaryOutput