Interface DownloadSource

  • All Implemented Interfaces:

    
    public interface DownloadSource
    
                        

    A remote PDF resource that can be downloaded by the DownloadJob. Implementation could be a file served from a content provider, or a file on the web.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract InputStream open() Opens an InputStream for downloading the document.
      abstract long getLength() Returns the total length of the download.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • open

         abstract InputStream open()

        Opens an InputStream for downloading the document.

        Returns:

        A fresh input stream for downloading the PDF document.

      • getLength

         abstract long getLength()

        Returns the total length of the download. This is optional and only used for calculating the Progress during download.

        Returns:

        Total length of the download in bytes, or UNKNOWN_DOWNLOAD_SIZE.