public class OnOffStore extends Object implements SeekableStore
OnOffStore class.
| Constructor and Description |
|---|
OnOffStore(SeekableStore store)
Constructor for OnOffStore.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Cleans up the Store.
|
void |
enable(boolean enable)
enable
|
int |
get(byte[] bytes,
int offset,
int length)
gets
length bytes from the store. |
void |
put(byte[] bytes,
int offset,
int length)
put
|
void |
seek(long position)
Reposition this
Store on a previously read position. |
public OnOffStore(SeekableStore store)
Constructor for OnOffStore.
store - a SeekableStore object.public void cleanup()
public void enable(boolean enable)
enable
enable - a boolean.public int get(byte[] bytes,
int offset,
int length)
throws IOException
length bytes from the store.get in interface Storebytes - array where to put the data in.offset - offset in the array to start put the data.length - length of the bytes got from the store.IOException - when an error occurs in the store, and data can't be
retrieved.public void put(byte[] bytes,
int offset,
int length)
throws IOException
put
put in interface Storebytes - an array of byte.offset - a int.length - a int.IOException - if any.public void seek(long position)
throws IOException
Store on a previously read position.seek in interface SeekableStoreposition - position to read the data from.IOException - If some error in the internal store happens.EOFException - If a position is greater than the actual Store
size.Copyright © 2008–2016. All rights reserved.