Package 

Interface PdfiumSource

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    
    public interface PdfiumSource
     implements AutoCloseable
                        

    An interface for providing custom data source to Pdfium.

    • Method Summary

      Modifier and Type Method Description
      abstract Integer read(Long position, ByteArray buffer, Integer size) Read data from the source.
      abstract Long getLength() Data length, in bytes
      • Methods inherited from class io.legere.pdfiumandroid.PdfiumSource

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • read

         abstract Integer read(Long position, ByteArray buffer, Integer size)

        Read data from the source.

        The position and size will never go out of range of the data source length. It may be possible for Pdfium to call this function multiple times for the same position.

        Parameters:
        position - byte offset from the beginning of the data source
        buffer - the buffer to read data into.
        size - the number of bytes to read.