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

## org.basex.io
Class RandomAccess

    java.lang.Object
      org.basex.io.RandomAccess

    public final class RandomAccess

extends java.lang.Object

This class allows positional read access.

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

Constructor Summary
`RandomAccess(java.lang.String f)` Constructor, initializing the file reader.

Method Summary
`void` | `close()` Closes the data access.
`void` | `cursor(long p)` Sets the disk cursor.
`boolean` | `more()` Checks if more bytes can be read.
`long` | `pos()` Returns the input position.
`int` | `read()` Reads the next byte.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RandomAccess

    public RandomAccess(java.lang.String f)
                 throws java.io.IOException

  Constructor, initializing the file reader.

  Parameters:
    `f` - the file to be read
  Throws:
    `java.io.IOException` - IO Exception

Method Detail

### close

    public void close()
               throws java.io.IOException

  Closes the data access.

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

### cursor

    public void cursor(long p)
                throws java.io.IOException

  Sets the disk cursor.

  Parameters:
    `p` - read position
  Throws:
    `java.io.IOException` - I/O exception

### read

    public int read()
             throws java.io.IOException

  Reads the next byte.

  Returns:
    next byte
  Throws:
    `java.io.IOException` - I/O exception

### pos

    public long pos()

  Returns the input position.

  Returns:
    position

### more

    public boolean more()

  Checks if more bytes can be read.

  Returns:
    result of check

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