Encoder

trait Encoder
class Object
trait Matchable
class Any

Value members

Abstract methods

def asByteBuffer: ByteBuffer

Completes the encoding and returns the ByteBuffer

Completes the encoding and returns the ByteBuffer

def asByteBuffers: Iterable[ByteBuffer]

Completes the encoding and returns a sequence of ByteBuffers

Completes the encoding and returns a sequence of ByteBuffers

def writeByte(b: Byte): Encoder

Encodes a single byte

Encodes a single byte

Value Params
b

Byte to encode

def writeByteArray(ba: Array[Byte]): Encoder

Encodes an array of Bytes

Encodes an array of Bytes

def writeByteBuffer(bb: ByteBuffer): Encoder

Encodes a ByteBuffer by writing its length and content

Encodes a ByteBuffer by writing its length and content

Value Params
bb

ByteBuffer to encode

def writeChar(c: Char): Encoder

Encodes a single character using UTF-8 encoding

Encodes a single character using UTF-8 encoding

Value Params
c

Character to encode

def writeDouble(d: Double): Encoder

Encodes a double as 8 bytes

Encodes a double as 8 bytes

Value Params
d

Double to encode

def writeDoubleArray(da: Array[Double]): Encoder

Encodes an array of Doubles

Encodes an array of Doubles

def writeFloat(f: Float): Encoder

Encodes a float as 4 bytes

Encodes a float as 4 bytes

Value Params
f

Float to encode

def writeFloatArray(fa: Array[Float]): Encoder

Encodes an array of Floats

Encodes an array of Floats

def writeInt(i: Int): Encoder

Encodes an integer

Encodes an integer

def writeIntArray(ia: Array[Int]): Encoder

Encodes an array of Integers

Encodes an array of Integers

def writeIntCode(intCode: Either[Byte, Int]): Encoder

Writes either a code byte (0-15) or an Int

Writes either a code byte (0-15) or an Int

Value Params
intCode

Integer or a code byte

def writeLong(l: Long): Encoder

Encodes a long

Encodes a long

Value Params
l

Long to encode

def writeLongCode(longCode: Either[Byte, Long]): Encoder

Writes either a code byte (0-15) or a Long

Writes either a code byte (0-15) or a Long

Value Params
longCode

Long or a code byte

def writeRawInt(i: Int): Encoder

Encodes an integer in 32-bits

Encodes an integer in 32-bits

Value Params
i

Integer to encode

def writeRawLong(l: Long): Encoder

Encodes a long in 64-bits

Encodes a long in 64-bits

Value Params
l

Long to encode

def writeShort(s: Short): Encoder

Encodes a short integer

Encodes a short integer

def writeString(s: String): Encoder

Encodes a string

Encodes a string

Value Params
s

String to encode