public interface

DownloadSource

com.pspdfkit.document.download.source.DownloadSource
Known Indirect Subclasses

Class Overview

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.

Summary

Constants
long UNKNOWN_DOWNLOAD_SIZE Constant value used when the total size of a download is not known.
Public Methods
abstract long getLength()
Returns the total length of the download.
abstract InputStream open()
Opens an InputStream for downloading the document.

Constants

public static final long UNKNOWN_DOWNLOAD_SIZE

Constant value used when the total size of a download is not known.

See Also
Constant Value: -1 (0xffffffffffffffff)

Public Methods

public abstract long getLength ()

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

Returns

public abstract InputStream open ()

Opens an InputStream for downloading the document.

Returns
  • A fresh input stream for downloading the PDF document.
Throws
IOException An exception may be thrown if there was an error while downloading.