Package org.apache.pdfbox.io
Class RandomAccessStreamCacheImpl
- java.lang.Object
-
- org.apache.pdfbox.io.RandomAccessStreamCacheImpl
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,RandomAccessStreamCache
public class RandomAccessStreamCacheImpl extends java.lang.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 Description RandomAccessStreamCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()RandomAccesscreateBuffer()Creates an instance of a buffer implementing the interface org.apache.pdfbox.io.RandomAccess.
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
createBuffer
public RandomAccess createBuffer() throws java.io.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:
createBufferin interfaceRandomAccessStreamCache- Returns:
- the instance of the buffer
- Throws:
java.io.IOException- if something went wrong
-
-