Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.io
Class TableAccess

    java.lang.Object
      org.basex.io.TableAccess

Direct Known Subclasses:
  TableDiskAccess, TableMemAccess

    public abstract class TableAccess

extends java.lang.Object

This abstract class defines the methods for accessing the database table representation.

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Constructor Summary
`TableAccess()`

Method Summary
`abstract void` | `close()` Closes the table access.
`abstract void` | `delete(int pre, int nr)` Delete a range of entries.
`abstract void` | `flush()` Flushes the table contents.
`abstract void` | `insert(int pre, byte[] entries)` Insert entries.
`abstract int` | `read1(int p, int o)` Reads a byte from the specified position and returns it as integer.
`abstract int` | `read2(int p, int o)` Reads a short value from the specified position and returns it as integer.
`abstract int` | `read4(int p, int o)` Reads an integer value from the specified position.
`abstract long` | `read5(int p, int o)` Reads an integer value from the specified position.
`abstract void` | `write1(int p, int o, int v)` Writes a byte to the specified position.
`abstract void` | `write2(int p, int o, int v)` Writes 2 bytes to the specified position.
`abstract void` | `write4(int p, int o, int v)` Writes an integer value to the specified position.
`abstract 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

### TableAccess

    public TableAccess()

Method Detail

### close

    public abstract void close()
                        throws java.io.IOException

  Closes the table access.

  Throws:
    `java.io.IOException` - in case of write errors

### delete

    public abstract void delete(int pre,
                                int nr)

  Delete a range of entries.

  Parameters:
    `pre` - pre value of the first node to delete
    `nr` - number of entries to be deleted

### flush

    public abstract void flush()
                        throws java.io.IOException

  Flushes the table contents.

  Throws:
    `java.io.IOException` - in case of write errors

### insert

    public abstract void insert(int pre,
                                byte[] entries)

  Insert entries.

  Parameters:
    `pre` - pre value of node to insert after
    `entries` - array of bytes containing the entries to insert

### read1

    public abstract int read1(int p,
                              int o)

  Reads a byte from the specified position and returns it as integer.

  Parameters:
    `p` - pre value
    `o` - offset
  Returns:
    integer value

### read2

    public abstract int read2(int p,
                              int o)

  Reads a short value from the specified position and returns it as integer.

  Parameters:
    `p` - pre value
    `o` - offset
  Returns:
    integer value

### read4

    public abstract int read4(int p,
                              int o)

  Reads an integer value from the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
  Returns:
    integer value

### read5

    public abstract long read5(int p,
                               int o)

  Reads an integer value from the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
  Returns:
    integer value

### write1

    public abstract void write1(int p,
                                int o,
                                int v)

  Writes a byte to the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
    `v` - value to be written

### write2

    public abstract void write2(int p,
                                int o,
                                int v)

  Writes 2 bytes to the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
    `v` - value to be written

### write4

    public abstract void write4(int p,
                                int o,
                                int v)

  Writes an integer value to the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
    `v` - value to be written

### write5

    public abstract void write5(int p,
                                int o,
                                long v)

  Writes a 5-byte value to the specified position.

  Parameters:
    `p` - pre value
    `o` - offset
    `v` - value to be written

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD