public final class TableDiskAccess extends TableAccess
| Constructor and Description |
|---|
TableDiskAccess(MetaData md,
java.lang.String pf)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the table access.
|
protected void |
copy(byte[] entries,
int pre,
int last)
Copies the specified values into the database.
|
void |
delete(int pre,
int nr)
Deletes the specified number of entries from the database.
|
void |
flush()
Flushes the table contents.
|
void |
insert(int pre,
byte[] entries)
Inserts the specified entries into the database.
|
int |
read1(int pre,
int off)
Reads a byte value and returns it as an integer value.
|
int |
read2(int pre,
int off)
Reads a short value and returns it as an integer value.
|
int |
read4(int pre,
int off)
Reads an integer value.
|
long |
read5(int pre,
int off)
Reads a 5-byte value and returns it as a long value.
|
void |
write1(int pre,
int off,
int v)
Writes a byte value to the specified position.
|
void |
write2(int pre,
int off,
int v)
Writes a short value to the specified position.
|
void |
write4(int pre,
int off,
int v)
Writes an integer value to the specified position.
|
void |
write5(int pre,
int off,
long v)
Writes a 5-byte value to the specified position.
|
replace, setpublic TableDiskAccess(MetaData md, java.lang.String pf) throws java.io.IOException
md - meta datapf - file prefixjava.io.IOException - I/O exceptionpublic void flush()
throws java.io.IOException
TableAccessflush in class TableAccessjava.io.IOException - I/O exceptionpublic void close()
throws java.io.IOException
TableAccessclose in class TableAccessjava.io.IOException - I/O exceptionpublic int read1(int pre,
int off)
TableAccessread1 in class TableAccesspre - pre valueoff - offsetpublic int read2(int pre,
int off)
TableAccessread2 in class TableAccesspre - pre valueoff - offsetpublic int read4(int pre,
int off)
TableAccessread4 in class TableAccesspre - pre valueoff - offsetpublic long read5(int pre,
int off)
TableAccessread5 in class TableAccesspre - pre valueoff - offsetpublic void write1(int pre,
int off,
int v)
TableAccesswrite1 in class TableAccesspre - pre valueoff - offsetv - value to be writtenpublic void write2(int pre,
int off,
int v)
TableAccesswrite2 in class TableAccesspre - pre valueoff - offsetv - value to be writtenpublic void write4(int pre,
int off,
int v)
TableAccesswrite4 in class TableAccesspre - pre valueoff - offsetv - value to be writtenpublic void write5(int pre,
int off,
long v)
TableAccesswrite5 in class TableAccesspre - pre valueoff - offsetv - value to be writtenprotected void copy(byte[] entries,
int pre,
int last)
TableAccesscopy in class TableAccessentries - entries to copypre - first target pre valuelast - last pre valuepublic void delete(int pre,
int nr)
TableAccessdelete in class TableAccesspre - pre value of the first node to deletenr - number of entries to be deletedpublic void insert(int pre,
byte[] entries)
TableAccessinsert in class TableAccesspre - pre valueentries - array of bytes containing the entries to insert