Top Description Constructors Methods
org.apache.pdfbox.io

public Class RandomAccessStreamCacheImpl

extends Object
implements RandomAccessStreamCache
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.io.RandomAccessStreamCache, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public RandomAccess
createBuffer()

Implements org.apache.pdfbox.io.RandomAccessStreamCache.createBuffer.

Creates an instance of a buffer implementing the interface org.apache.pdfbox.io.RandomAccess.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RandomAccessStreamCacheImplback to summary
public RandomAccessStreamCacheImpl()

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
createBufferback to summary
public RandomAccess createBuffer() throws IOException

Implements org.apache.pdfbox.io.RandomAccessStreamCache.createBuffer.

Doc from org.apache.pdfbox.io.RandomAccessStreamCache.createBuffer.

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.

Returns:RandomAccess

the instance of the buffer

Annotations
@Override
Exceptions
IOException:
if something went wrong