Buffer

cc.otavia.buffer.Buffer
See theBuffer companion trait
object Buffer

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Buffer.type

Members list

Value members

Concrete methods

def wrap(byteBuffer: ByteBuffer): Buffer

Wraps a ByteBuffer into a Buffer.

Wraps a ByteBuffer into a Buffer.

The new buffer will be backed by the given ByteBuffer; that is, modifications to the buffer will cause the ByteBuffer to be modified and vice versa. The new buffer's capacity will be ByteBuffer#capacity, its readerOffset is set to position of ByteBuffer and writerOffset is set to limit of ByteBuffer, and its byte order will be

ByteOrder#BIG_ENDIAN.

Value parameters

byteBuffer

The ByteBuffer that will back this buffer

Attributes

Returns

The new byte buffer

def wrap(array: Array[Byte]): Buffer

Wraps a byte array into a Buffer.

Wraps a byte array into a Buffer.

The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its readerOffset and writerOffset will be zero, and its byte order will be

BIG_ENDIAN.

Value parameters

array

The array that will back this buffer

Attributes

Returns

The new byte buffer