org.apache.pdfbox.io

## Class RandomAccessStreamCacheImpl

- java.lang.Object
- - org.apache.pdfbox.io.RandomAccessStreamCacheImpl

All Implemented Interfaces:
  Closeable, AutoCloseable, RandomAccessStreamCache

    public class RandomAccessStreamCacheImpl
    extends Object
    implements RandomAccessStreamCache

A default implementation of the interface RandomAccessStreamCache using a memory backed RandomAccessReadWriteBuffer.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.pdfbox.io.RandomAccessStreamCache

`RandomAccessStreamCache.StreamCacheCreateFunction`

### Constructor Summary

Constructors
Constructor and Description
`RandomAccessStreamCacheImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`RandomAccess` `createBuffer()` Creates an instance of a buffer implementing the interface org.apache.pdfbox.io.RandomAccess.

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

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

### Constructor Detail

#### RandomAccessStreamCacheImpl

    public RandomAccessStreamCacheImpl()

### Method Detail

#### close

    public void close()
               throws IOException

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

#### createBuffer

    public RandomAccess createBuffer()
                              throws IOException

Creates an instance of a buffer implementing the interface org.apache.pdfbox.io.RandomAccess. The caller should close the buffer after usage otherwise the buffer shall be closed once the underlying RandomAccessStreamCache is closed.

Specified by:
  `createBuffer` in interface `RandomAccessStreamCache`
Returns:
  the instance of the buffer
Throws:
  `IOException` - if something went wrong