Package org.apache.pdfbox.io
Class RandomAccessStreamCacheImpl
java.lang.Object
org.apache.pdfbox.io.RandomAccessStreamCacheImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Creates an instance of a buffer implementing the interface org.apache.pdfbox.io.RandomAccess.
-
Constructor Details
-
RandomAccessStreamCacheImpl
public RandomAccessStreamCacheImpl()
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
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.- Specified by:
createBufferin interfaceRandomAccessStreamCache- Returns:
- the instance of the buffer
- Throws:
IOException- if something went wrong
-