Cache

A high-level interface for reading and writing files to and from a collection of JS5 archives.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun capacity(archive: Int): Int
fun capacity(archive: Int, group: Int): Int
fun capacity(archive: Int, group: String): Int
Link copied to clipboard
fun capacityNamed(archive: Int, groupNameHash: Int): Int
Link copied to clipboard
fun clear()

Writes pending changes back to the underlying Store and clears the internal group cache.

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun create(archive: Int)
Link copied to clipboard
fun exists(archive: Int): Boolean
fun exists(archive: Int, group: Int): Boolean
fun exists(archive: Int, group: String): Boolean
fun exists(archive: Int, group: Int, file: Int): Boolean
fun exists(archive: Int, group: String, file: Int): Boolean
fun exists(archive: Int, group: String, file: String): Boolean
Link copied to clipboard
fun existsNamed(archive: Int, groupNameHash: Int): Boolean
fun existsNamed(archive: Int, groupNameHash: Int, fileNameHash: Int): Boolean
Link copied to clipboard
fun existsNamedGroup(archive: Int, groupNameHash: Int, file: Int): Boolean
Link copied to clipboard
open override fun flush()

Writes pending changes back to the underlying Store.

Link copied to clipboard
fun list(): Iterator<Int>
fun list(archive: Int): Iterator<Js5Index.Group<*>>
fun list(archive: Int, group: Int): Iterator<Js5Index.File>
fun list(archive: Int, group: String): Iterator<Js5Index.File>
Link copied to clipboard
fun listNamed(archive: Int, groupNameHash: Int): Iterator<Js5Index.File>
Link copied to clipboard
fun read(archive: Int, group: Int, file: Int, key: SymmetricKey = SymmetricKey.ZERO): ByteBuf
fun read(archive: Int, group: String, file: Int, key: SymmetricKey = SymmetricKey.ZERO): ByteBuf
fun read(archive: Int, group: String, file: String, key: SymmetricKey = SymmetricKey.ZERO): ByteBuf
Link copied to clipboard
fun readNamed(archive: Int, groupNameHash: Int, fileNameHash: Int, key: SymmetricKey = SymmetricKey.ZERO): ByteBuf
Link copied to clipboard
fun readNamedGroup(archive: Int, groupNameHash: Int, file: Int, key: SymmetricKey = SymmetricKey.ZERO): ByteBuf
Link copied to clipboard
fun remove(archive: Int)
fun remove(archive: Int, group: Int)
fun remove(archive: Int, group: String)
fun remove(archive: Int, group: Int, file: Int, key: SymmetricKey = SymmetricKey.ZERO)
fun remove(archive: Int, group: String, file: Int, key: SymmetricKey = SymmetricKey.ZERO)
fun remove(archive: Int, group: String, file: String, key: SymmetricKey = SymmetricKey.ZERO)
Link copied to clipboard
fun removeNamed(archive: Int, groupNameHash: Int)
fun removeNamed(archive: Int, groupNameHash: Int, fileNameHash: Int, key: SymmetricKey = SymmetricKey.ZERO)
Link copied to clipboard
fun removeNamedGroup(archive: Int, groupNameHash: Int, file: Int, key: SymmetricKey = SymmetricKey.ZERO)
Link copied to clipboard
fun write(archive: Int, group: Int, file: Int, buf: ByteBuf, key: SymmetricKey = SymmetricKey.ZERO)
fun write(archive: Int, group: String, file: Int, buf: ByteBuf, key: SymmetricKey = SymmetricKey.ZERO)
fun write(archive: Int, group: String, file: String, buf: ByteBuf, key: SymmetricKey = SymmetricKey.ZERO)
Link copied to clipboard
fun writeNamed(archive: Int, groupNameHash: Int, fileNameHash: Int, buf: ByteBuf, key: SymmetricKey = SymmetricKey.ZERO)
Link copied to clipboard
fun writeNamedGroup(archive: Int, groupNameHash: Int, file: Int, buf: ByteBuf, key: SymmetricKey = SymmetricKey.ZERO)