ByteStringByteAccess

io.bullet.borer.compat.akka.ByteStringByteAccess
object ByteStringByteAccess extends ByteAccess[ByteString]

ByteAccess for ByteString.

Attributes

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

Members list

Type members

Types

Value members

Concrete methods

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

Returns the concatenation of a and b.

Returns the concatenation of a and b.

Attributes

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

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: ByteString, byteArray: Array[Byte], startIndex: Int): ByteString

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: ByteString, byteBuffer: ByteBuffer): ByteString

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 empty: ByteString

Returns an empty Bytes instance.

Returns an empty Bytes instance.

Attributes

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

Converts the given byte array into a Bytes instance.

Converts the given byte array into a Bytes instance.

Attributes

def isEmpty(bytes: ByteString): Boolean

Returns true iff the given Bytes instance is empty.

Returns true iff the given Bytes instance is empty.

Attributes

def sizeOf(bytes: ByteString): 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: ByteString): Array[Byte]

Converts the given Bytes instance into a byte array.

Converts the given Bytes instance into a byte array.

Attributes