cpw.mods.fml.repackage.com.nothome.delta

## Class RandomAccessFileSeekableSource

- java.lang.Object
- - cpw.mods.fml.repackage.com.nothome.delta.RandomAccessFileSeekableSource

- All Implemented Interfaces:
    SeekableSource, Closeable, AutoCloseable

      public class RandomAccessFileSeekableSource
      extends Object
      implements SeekableSource

  Wraps a random access file.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomAccessFileSeekableSource(RandomAccessFile raf)` Constructs a new RandomAccessFileSeekableSource.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `long` | `length()`
    `int` | `read(byte[] b, int off, int len)`
    `int` | `read(ByteBuffer bb)` Reads up to `Buffer.remaining()` bytes from the source, returning the number of bytes read, or -1 if no bytes were read and EOF was reached.
    `void` | `seek(long pos)` Sets the position for the next `SeekableSource.read(ByteBuffer)`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RandomAccessFileSeekableSource

          public RandomAccessFileSeekableSource(RandomAccessFile raf)

      Constructs a new RandomAccessFileSeekableSource.
      Parameters:
        `raf` -

  - ### Method Detail

    - #### seek

          public void seek(long pos)
                    throws IOException

      Description copied from interface: `SeekableSource`
      Sets the position for the next `SeekableSource.read(ByteBuffer)`.
      Specified by:
        `seek` in interface `SeekableSource`
      Throws:
        `IOException`

    - #### read

          public int read(byte[] b,
                 int off,
                 int len)
                   throws IOException

      Throws:
        `IOException`

    - #### length

          public long length()
                      throws IOException

      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### read

          public int read(ByteBuffer bb)
                   throws IOException

      Description copied from interface: `SeekableSource`
      Reads up to `Buffer.remaining()` bytes from the source, returning the number of bytes read, or -1 if no bytes were read and EOF was reached.
      Specified by:
        `read` in interface `SeekableSource`
      Throws:
        `IOException`