|
Beatmup Java package
|
A key-value pair set storing pieces of arbitrary data (chunks) under string keys. More...
Public Member Functions | |
| void | open () throws IOError |
| Opens the collection to read chunks from it. More... | |
| void | close () |
| Closes the collection after a reading session. More... | |
| long | size () |
| boolean | chunkExists (String id) |
| Check if a specific chunk exists. More... | |
| long | chunkSize (String id) |
| Retrieves size of a specific chunk. More... | |
| String | read (String id) |
| Reads a chunk with a specific id and returns it as a string. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Beatmup.Object | |
| synchronized void | dispose () |
| Destroys the native object. More... | |
Protected Attributes inherited from Beatmup.Object | |
| long | handle |
| pointer to the native object More... | |
A key-value pair set storing pieces of arbitrary data (chunks) under string keys.
A chunk is a header and a piece of data packed in memory like this: (idLength[4], id[idLength], size[sizeof(chunksize_t)], data[size]) ChunkCollection defines an interface to retrieve chunks by their ids.
Definition at line 30 of file ChunkCollection.java.
|
inline |
Opens the collection to read chunks from it.
Definition at line 46 of file ChunkCollection.java.
|
inline |
Closes the collection after a reading session.
Definition at line 53 of file ChunkCollection.java.
|
inline |
|
inline |
Check if a specific chunk exists.
| id | The chunk id |
true if the chunk exists in the collection. Definition at line 69 of file ChunkCollection.java.
|
inline |
Retrieves size of a specific chunk.
| id | The chunk id |
Definition at line 78 of file ChunkCollection.java.
|
inline |
Reads a chunk with a specific id and returns it as a string.
If there is no chunk with the given id, returns an empty string.
| id | The chunk id |
Definition at line 88 of file ChunkCollection.java.