Class ContentResolverDownloadSource
-
- All Implemented Interfaces:
-
com.pspdfkit.document.download.source.DownloadSource
public final class ContentResolverDownloadSource implements DownloadSource
A source for downloading a document from a ContentProvider.
-
-
Constructor Summary
Constructors Constructor Description ContentResolverDownloadSource(Context context, Uri uri)
Constructor taking a uri
pointing to a content provider.
-
Method Summary
Modifier and Type Method Description Uri
getUri()
Returns the Uri pointing to the content provider served document. InputStream
open()
Opens an InputStream for downloading the document. long
getLength()
Returns the total length of the download. String
toString()
-
-
Method Detail
-
getUri
@NonNull() Uri getUri()
Returns the Uri pointing to the content provider served document.
- Returns:
A Uri pointing to a content provider PDF document.
-
open
InputStream open()
Opens an InputStream for downloading the document.
- Returns:
A fresh input stream for downloading the PDF document.
-
getLength
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.
-
-
-
-