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

## com.sun.jimi.util
Interface RandomAccessStorage

All Known Implementing Classes:
  MemoryRandomAccessStorage, FileRandomAccessStorage

public abstract interface RandomAccessStorage

Interface for RandomAccessFile-like functionality. Access to read and write operations is provided with JavaBeans-style InputStream and OutputStream representations, rather than methods conforming to no standard formal interface. This is to leverage existing Input/OutputStream-based code. Note: I/O stream representations do not have separate state, and the file position is thus shared by all representations, making it unsafe for uncoordinated concurrent access, like a normal RandomAccessFile. All read/write operations advance the file pointer.

Method Summary
`java.io.InputStream` | `asInputStream()` Deprecated. temporary method.
`java.io.OutputStream` | `asOutputStream()` Deprecated. temporary method.
`void` | `seek(long position)` Seek to a specified byte-offset relative to the beginning of the file.
`void` | `skip(int bytes)` Skip a number of bytes, advancing the byte-offset.

Method Detail

### seek

    public void seek(long position)
              throws java.io.IOException

  Seek to a specified byte-offset relative to the beginning of the file.
  Parameters:
    `position` - the position to seek to

### skip

    public void skip(int bytes)
              throws java.io.IOException

  Skip a number of bytes, advancing the byte-offset.
  Parameters:
    `bytes` - the number of bytes to skip

### asOutputStream

    public java.io.OutputStream asOutputStream()

  Deprecated. temporary method.
  Return an OutputStream which writes to the storage.

### asInputStream

    public java.io.InputStream asInputStream()

  Deprecated. temporary method.
  Return an InputStream which reads from the storage.

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