Store

A low-level interface for reading and writing raw groups directly to and from a collection of JS5 archives.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
abstract fun create(archive: Int)

Creates an archive. Does nothing if the archive already exists.

Link copied to clipboard
abstract fun exists(archive: Int): Boolean

Checks whether an archive exists.

abstract fun exists(archive: Int, group: Int): Boolean

Checks whether a group exists.

Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun list(): List<Int>

Lists all archives in the store.

abstract fun list(archive: Int): List<Int>

Lists all groups in an archive.

Link copied to clipboard
abstract fun read(archive: Int, group: Int): ByteBuf

Reads a group.

Link copied to clipboard
abstract fun remove(archive: Int)

Deletes an archive and all groups contained inside it. Does nothing if the archive does not exist.

abstract fun remove(archive: Int, group: Int)

Deletes a group. Does nothing if the archive or group does not exist.

Link copied to clipboard
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.