org.apache.commons.io.output

## Class RandomAccessFileOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.commons.io.output.RandomAccessFileOutputStream

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

      public final class RandomAccessFileOutputStream
      extends OutputStream

  An `OutputStream` that writes to a `RandomAccessFile`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RandomAccessFileOutputStream.Builder` Builds a new `RandomAccessFileOutputStream`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RandomAccessFileOutputStream.Builder` | `builder()` Constructs a new `RandomAccessFileOutputStream.Builder`.
    `void` | `close()`
    `void` | `flush()`
    `RandomAccessFile` | `getRandomAccessFile()` Gets the underlying random access file.
    `void` | `write(int b)`

    - ### Methods inherited from class java.io.OutputStream

      `write, write`

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

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

- - ### Method Detail

    - #### builder

          public static RandomAccessFileOutputStream.Builder builder()

      Constructs a new `RandomAccessFileOutputStream.Builder`.
      Returns:
        a new `RandomAccessFileOutputStream.Builder`.

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `OutputStream`
      Throws:
        `IOException`

    - #### flush

          public void flush()
                     throws IOException

      Specified by:
        `flush` in interface `Flushable`
      Overrides:
        `flush` in class `OutputStream`
      Throws:
        `IOException`

    - #### getRandomAccessFile

          public RandomAccessFile getRandomAccessFile()

      Gets the underlying random access file.
      Returns:
        the underlying random access file.

    - #### write

          public void write(int b)
                     throws IOException

      Specified by:
        `write` in class `OutputStream`
      Throws:
        `IOException`