write

abstract fun write(archive: Int, group: Int, buf: ByteBuf)

Writes a group. If the archive does not exist, it is created first. If a group with the same ID already exists, it is overwritten.

This method consumes the readable portion of the given ByteBuf. It does not modify the ByteBuf's reference count.

Parameters

archive

the archive ID.

group

the group ID.

buf

the new contents of the group.

Throws

if the archive or group ID is out of bounds, or if buf is too long (see MAX_GROUP_SIZE).

if the store is full.

if an underlying I/O error occurs.