|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.db4o.io.MemoryBin
public class MemoryBin
Constructor Summary | |
---|---|
MemoryBin(byte[] bytes,
GrowthStrategy growthStrategy)
|
|
MemoryBin(int initialSize,
GrowthStrategy growthStrategy)
|
Method Summary | |
---|---|
long |
bufferSize()
|
void |
close()
closes the Bin. |
byte[] |
data()
Returns a copy of the raw data contained in this bin for external processing. |
long |
length()
returns the length of the Bin (on disc, in memory). |
int |
read(long pos,
byte[] bytes,
int length)
reads a given number of bytes into an array of bytes at an offset position. |
void |
sync()
flushes the buffer content to the physical storage media. |
void |
sync(java.lang.Runnable runnable)
runs the Runnable between two calls to sync(); |
int |
syncRead(long position,
byte[] bytes,
int bytesToRead)
reads a given number of bytes into an array of bytes at an offset position. |
void |
write(long pos,
byte[] buffer,
int length)
for internal processing only. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryBin(int initialSize, GrowthStrategy growthStrategy)
public MemoryBin(byte[] bytes, GrowthStrategy growthStrategy)
Method Detail |
---|
public long length()
Bin
length
in interface Bin
public long bufferSize()
public int read(long pos, byte[] bytes, int length) throws Db4oIOException
Bin
read
in interface Bin
pos
- the offset position to read atbytes
- the byte array to read bytes intolength
- the number of bytes to be read
Db4oIOException
public void sync() throws Db4oIOException
Bin
sync
in interface Bin
Db4oIOException
public int syncRead(long position, byte[] bytes, int bytesToRead)
Bin
Bin.read(long, byte[], int)
method, the Bin should ensure direct access to the raw storage medium.
No caching should take place.
syncRead
in interface Bin
position
- the offset position to read atbytes
- the byte array to read bytes intobytesToRead
- the number of bytes to be read
public void close()
Bin
close
in interface Bin
public byte[] data()
public void write(long pos, byte[] buffer, int length) throws Db4oIOException
write
in interface Bin
pos
- the offset position to write atbuffer
- the array of bytes to writelength
- the number of bytes to write
Db4oIOException
public void sync(java.lang.Runnable runnable)
Bin
sync
in interface Bin
|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |