|
Mobios v0.91 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileBufferAccessor
An abstraction for accessing an underlying file through a buffering strategy. Implementations of this could include a simple RandomAccessFile paging system that uses Java 1.4 memory mapping facilities, or not.
Method Summary | |
---|---|
void |
flush()
Flushes any pending contents of the buffer from memory to the file. |
int |
readByte(long position)
Reads a single byte from the given position in the given RandomAccessFile that has been assigned the given id value. |
int |
readByteArray(long position,
byte[] buf,
int off,
int len)
Reads a byte array from the given position in the file. |
void |
sizeChange(long old_file_length,
long new_file_length)
Notifies the buffering strategy that the size of the file has changed. |
void |
writeByte(long position,
byte b)
Writes a single byte to the given position in the file. |
int |
writeByteArray(long position,
byte[] buf,
int off,
int len)
Writes a byte array to the given position in the file. |
Method Detail |
---|
int readByte(long position) throws IOException
IOException
int readByteArray(long position, byte[] buf, int off, int len) throws IOException
IOException
void writeByte(long position, byte b) throws IOException
IOException
int writeByteArray(long position, byte[] buf, int off, int len) throws IOException
IOException
void flush() throws IOException
IOException
void sizeChange(long old_file_length, long new_file_length) throws IOException
IOException
|
Mobios v0.91 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |