java.lang.Object | |
↳ | com.pspdfkit.document.download.source.AssetDownloadSource |
A source for copying a PDF document from the app assets to the filesystem.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AssetDownloadSource(Context context, String assetPath)
Constructor taking an
assetPath pointing to a PDF document inside the app's assets. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getAssetPath()
Returns the asset path of the served document.
| ||||||||||
long |
getLength()
Returns the total length of the download.
| ||||||||||
InputStream |
open()
Opens an
InputStream for downloading the document. | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructor taking an assetPath
pointing to a PDF document inside the app's assets.
context | Context for accessing the document using a content resolver. |
---|---|
assetPath | The path pointing to a document in the app's assets. |
Returns the asset path of the served document.
Returns the total length of the download. This is optional and only used for calculating the
Progress
during download.
UNKNOWN_DOWNLOAD_SIZE
.
Opens an InputStream
for downloading the document.
IOException |
---|