19 package Beatmup.Utils;
21 import java.io.IOError;
23 import Beatmup.Object;
31 private native
void open(
long handle)
throws IOError;
34 private native
boolean chunkExists(
long handle, String
id);
35 private native
long chunkSize(
long handle, String
id);
36 private native
void save(
long handle, String filename,
boolean append);
37 private native String read(
long handle, String
id);
46 public void open() throws IOError {
70 return chunkExists(
handle,
id);
79 return chunkSize(
handle,
id);
88 public String
read(String
id) {
Base class for objects natively managed by Beatmup.
long handle
pointer to the native object
A key-value pair set storing pieces of arbitrary data (chunks) under string keys.
String read(String id)
Reads a chunk with a specific id and returns it as a string.
void close()
Closes the collection after a reading session.
long chunkSize(String id)
Retrieves size of a specific chunk.
boolean chunkExists(String id)
Check if a specific chunk exists.
void open()
Opens the collection to read chunks from it.