ForByteBuffer

io.bullet.borer.ByteAccess$.ForByteBuffer$
object ForByteBuffer extends ByteAccess[ByteBuffer]

The default ByteAccess for ByteBuffer.

Attributes

Graph
Supertypes
trait ByteAccess[ByteBuffer]
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Types

Value members

Concrete methods

def concat(a: ByteBuffer, b: ByteBuffer): ByteBuffer

Returns the concatenation of a and b.

Returns the concatenation of a and b.

Attributes

def convert[B](value: B)(implicit byteAccess: ByteAccess[B]): ByteBuffer

Converts the given value of type B into a Bytes instance.

Converts the given value of type B into a Bytes instance.

Attributes

def copyToByteArray(bytes: ByteBuffer, byteArray: Array[Byte], startIndex: Int): ByteBuffer

Copies the given Bytes instance into the given byteArray starting at the given index. Returns a Bytes instance holding all bytes that could not be written to the byte array due to capacity constraints or an empty Bytes instance, if the given byte array was large enough to hold all bytes.

Copies the given Bytes instance into the given byteArray starting at the given index. Returns a Bytes instance holding all bytes that could not be written to the byte array due to capacity constraints or an empty Bytes instance, if the given byte array was large enough to hold all bytes.

Attributes

def copyToByteBuffer(bytes: ByteBuffer, byteBuffer: ByteBuffer): ByteBuffer

Copies the given Bytes instance into the given byteBuffer. Returns a Bytes instance holding all bytes that could not be written to the byteBuffer due to capacity constraints or an empty Bytes instance, if the given byteBuffer was large enough to hold all bytes.

Copies the given Bytes instance into the given byteBuffer. Returns a Bytes instance holding all bytes that could not be written to the byteBuffer due to capacity constraints or an empty Bytes instance, if the given byteBuffer was large enough to hold all bytes.

Attributes

def fromByteArray(byteArray: Array[Byte]): ByteBuffer

Converts the given byte array into a Bytes instance.

Converts the given byte array into a Bytes instance.

Attributes

def isEmpty(bytes: ByteBuffer): Boolean

Returns true iff the given Bytes instance is empty.

Returns true iff the given Bytes instance is empty.

Attributes

def sizeOf(bytes: ByteBuffer): Long

Returns the number of bytes contained in the given Bytes instance.

Returns the number of bytes contained in the given Bytes instance.

Attributes

def toByteArray(bytes: ByteBuffer): Array[Byte]

Converts the given Bytes instance into a byte array.

Converts the given Bytes instance into a byte array.

Attributes

Concrete fields

val empty: ByteBuffer

Returns an empty Bytes instance.

Returns an empty Bytes instance.

Attributes