org.apache.pdfbox.io

## Class RandomAccessOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.pdfbox.io.RandomAccessOutputStream

All Implemented Interfaces:
  Closeable, Flushable, AutoCloseable

    public class RandomAccessOutputStream
    extends OutputStream

An OutputStream which writes to a RandomAccessWrite.

Author:
  Ben Litchfield, John Hewson

### Constructor Summary

Constructors
Constructor and Description
`RandomAccessOutputStream(RandomAccessWrite writer)` Constructor to create a new output stream which writes to the given RandomAccessWrite.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `write(byte[] b)`
`void` `write(byte[] b, int offset, int length)`
`void` `write(int b)`

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

`close, flush`

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

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

### Constructor Detail

#### RandomAccessOutputStream

    public RandomAccessOutputStream(RandomAccessWrite writer)

Constructor to create a new output stream which writes to the given RandomAccessWrite.

Parameters:
  `writer` - The random access writer for output

### Method Detail

#### write

    public void write(byte[] b,
                      int offset,
                      int length)
               throws IOException

Overrides:
  `write` in class `OutputStream`
Throws:
  `IOException`

#### write

    public void write(byte[] b)
               throws IOException

Overrides:
  `write` in class `OutputStream`
Throws:
  `IOException`

#### write

    public void write(int b)
               throws IOException

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