|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.io.TableAccess
org.basex.io.TableMemAccess
public final class TableMemAccess
This class allows main memory access to the database table representation.
| Constructor Summary | |
|---|---|
TableMemAccess(java.lang.String db,
java.lang.String fn,
int size,
Prop pr)
Stores the file content in a long array. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the table access. |
void |
delete(int pre,
int size)
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableMemAccess(java.lang.String db,
java.lang.String fn,
int size,
Prop pr)
throws java.io.IOException
db - name of the databasefn - the file to be readsize - table sizepr - database properties
java.io.IOException - IO Exception| Method Detail |
|---|
public int read1(int p,
int o)
TableAccess
read1 in class TableAccessp - pre valueo - offset
public int read2(int p,
int o)
TableAccess
read2 in class TableAccessp - pre valueo - offset
public int read4(int p,
int o)
TableAccess
read4 in class TableAccessp - pre valueo - offset
public long read5(int p,
int o)
TableAccess
read5 in class TableAccessp - pre valueo - offset
public void write1(int p,
int o,
int v)
TableAccess
write1 in class TableAccessp - pre valueo - offsetv - value to be written
public void write2(int p,
int o,
int v)
TableAccess
write2 in class TableAccessp - pre valueo - offsetv - value to be written
public void write4(int p,
int o,
int v)
TableAccess
write4 in class TableAccessp - pre valueo - offsetv - value to be written
public void write5(int p,
int o,
long v)
TableAccess
write5 in class TableAccessp - pre valueo - offsetv - value to be written
public void delete(int pre,
int size)
TableAccess
delete in class TableAccesspre - pre value of the first node to deletesize - number of entries to be deleted
public void insert(int pre,
byte[] entries)
TableAccess
insert in class TableAccesspre - pre value of node to insert afterentries - array of bytes containing the entries to insertpublic void flush()
TableAccess
flush in class TableAccesspublic void close()
TableAccess
close in class TableAccess
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||