public final class TableMemAccess extends TableAccess
| Constructor and Description |
|---|
TableMemAccess(MetaData md)
Stores the table in long arrays.
|
| 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 p,
int o)
Reads a byte value and returns it as an integer value.
|
int |
read2(int p,
int o)
Reads a short value and returns it as an integer value.
|
int |
read4(int p,
int o)
Reads an integer value.
|
long |
read5(int p,
int o)
Reads a 5-byte value and returns it as a long value.
|
void |
write1(int p,
int o,
int v)
Writes a byte value to the specified position.
|
void |
write2(int p,
int o,
int v)
Writes a short value to the specified position.
|
void |
write4(int p,
int o,
int v)
Writes an integer value to the specified position.
|
void |
write5(int p,
int o,
long v)
Writes a 5-byte value to the specified position.
|
replace, setpublic TableMemAccess(MetaData md)
md - meta datapublic void flush()
TableAccessflush in class TableAccesspublic void close()
throws java.io.IOException
TableAccessclose in class TableAccessjava.io.IOException - I/O exceptionpublic int read1(int p,
int o)
TableAccessread1 in class TableAccessp - pre valueo - offsetpublic int read2(int p,
int o)
TableAccessread2 in class TableAccessp - pre valueo - offsetpublic int read4(int p,
int o)
TableAccessread4 in class TableAccessp - pre valueo - offsetpublic long read5(int p,
int o)
TableAccessread5 in class TableAccessp - pre valueo - offsetpublic void write1(int p,
int o,
int v)
TableAccesswrite1 in class TableAccessp - pre valueo - offsetv - value to be writtenpublic void write2(int p,
int o,
int v)
TableAccesswrite2 in class TableAccessp - pre valueo - offsetv - value to be writtenpublic void write4(int p,
int o,
int v)
TableAccesswrite4 in class TableAccessp - pre valueo - offsetv - value to be writtenpublic void write5(int p,
int o,
long v)
TableAccesswrite5 in class TableAccessp - pre valueo - 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