Interface RandomAccessStreamCache

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    RandomAccessStreamCacheImpl, ScratchFile

    public interface RandomAccessStreamCache
    extends java.io.Closeable
    An interface describing a StreamCache to be used when creating/writing streams of a PDF.
    • Method Detail

      • createBuffer

        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.
        Returns:
        the instance of the buffer
        Throws:
        java.io.IOException - if something went wrong