|
||||||||||
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)
Stores the file content in a long array. |
Method Summary | |
---|---|
void |
close()
Closes the table access. |
void |
delete(int pre,
int size)
Delete a range of entries. |
void |
flush()
Flushes the table contents. |
void |
insert(int pre,
byte[] entries)
Insert entries. |
int |
read1(int p,
int o)
Reads a byte from the specified position and returns it as integer. |
int |
read2(int p,
int o)
Reads a short value from the specified position and returns it as integer. |
int |
read4(int p,
int o)
Reads an integer value from the specified position. |
long |
read5(int p,
int o)
Reads an integer value from the specified position. |
void |
write1(int p,
int o,
int v)
Writes a byte to the specified position. |
void |
write2(int p,
int o,
int v)
Writes 2 bytes 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) throws java.io.IOException
db
- name of the databasefn
- the file to be readsize
- table size
java.io.IOException
- IO ExceptionMethod Detail |
---|
public int read1(int p, int o)
TableAccess
read1
in class TableAccess
p
- pre valueo
- offset
public int read2(int p, int o)
TableAccess
read2
in class TableAccess
p
- pre valueo
- offset
public int read4(int p, int o)
TableAccess
read4
in class TableAccess
p
- pre valueo
- offset
public long read5(int p, int o)
TableAccess
read5
in class TableAccess
p
- pre valueo
- offset
public void write1(int p, int o, int v)
TableAccess
write1
in class TableAccess
p
- pre valueo
- offsetv
- value to be writtenpublic void write2(int p, int o, int v)
TableAccess
write2
in class TableAccess
p
- pre valueo
- offsetv
- value to be writtenpublic void write4(int p, int o, int v)
TableAccess
write4
in class TableAccess
p
- pre valueo
- offsetv
- value to be writtenpublic void write5(int p, int o, long v)
TableAccess
write5
in class TableAccess
p
- pre valueo
- offsetv
- value to be writtenpublic void delete(int pre, int size)
TableAccess
delete
in class TableAccess
pre
- pre value of the first node to deletesize
- number of entries to be deletedpublic void insert(int pre, byte[] entries)
TableAccess
insert
in class TableAccess
pre
- pre value of node to insert afterentries
- array of bytes containing the entries to insertpublic void flush()
TableAccess
flush
in class TableAccess
public void close()
TableAccess
close
in class TableAccess
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |