Buffer

wvlet.airframe.msgpack.spi.Buffer
trait Buffer

Buffer interface, which does not have any internal cursors unlike ByteBuffer of Java library.

  • The read methods read the buffer data from the given position.
  • The write methods write data to the specified position in the buffer and return the written byte length.

If the buffer capacity is insufficient, these read/write methods throw an InsufficientBufferException. If this exception is thrown, the user code should feed more data, and then resume reading.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def ensureCapacity(position: Int, requestedLength: Int): Unit
def hasCapacity(position: Int, requestedLength: Int): Boolean
def size: Int
def slice(position: Int, size: Int): ReadBuffer

Return a (shallow) copy of the buffer.

Return a (shallow) copy of the buffer.

Attributes