|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DBFile
An interface to access disk files, or main memory buffers.
Accesses to the DBFile are not guaranteed to be thread-safe, that is,
concurrent accesses to the DBFile may cause undesired effects; for example,
contiguous write requests may overwrite the previous write results because
the second write request can be performed before the file cursor is properly updated.
| Method Summary | |
|---|---|
void |
close()
Closes the file. |
void |
read(byte[] buffer,
int offset,
int byteSize)
Reads data from the file, and writes the read data to the specified buffer |
void |
seek(long fileBytePos)
Sets the file pointer offset, measured from the beginning of the file, at which the next read/write request occurs. |
void |
write(byte[] buffer,
int offset,
int byteSize)
Writes the given data into the file |
| Method Detail |
|---|
void read(byte[] buffer,
int offset,
int byteSize)
throws DBException
buffer - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenbyteSize - the bytes to read
DBFileException - when failed to read the data
DBException
void write(byte[] buffer,
int offset,
int byteSize)
throws DBException
buffer - the dataoffset - the start offset in the databyteSize - the bytes to write
DBFileException - when failed to write the data
DBException
void seek(long fileBytePos)
throws DBException
fileBytePos -
DBFileException
DBException
void close()
throws DBException
DBFileException
DBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
