|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xerial.db.storage.MemoryFile
public class MemoryFile
MemoryFile is a class to handle main memory as if it were a file
| Constructor Summary | |
|---|---|
MemoryFile()
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the file. |
void |
loadFromFile(String fileName)
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryFile()
| Method Detail |
|---|
public void loadFromFile(String fileName)
throws IOException,
DBException
IOException
DBException
public void read(byte[] buffer,
int offset,
int byteSize)
throws DBException
DBFile
read in interface DBFilebuffer - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenbyteSize - the bytes to read
DBException
public void seek(long fileBytePos)
throws DBException
DBFile
seek in interface DBFileDBException
public void write(byte[] buffer,
int offset,
int byteSize)
throws DBException
DBFile
write in interface DBFilebuffer - the dataoffset - the start offset in the databyteSize - the bytes to write
DBException
public void close()
throws DBException
DBFile
close in interface DBFileDBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
