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.

class Object
trait Matchable
class Any

Value members

Abstract methods

@throws(scala.throws.$lessinit$greater$default$1[wvlet.airframe.msgpack.spi.InsufficientBufferException])
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.