Summary
Protected Methods |
InputStream
|
openInputStream()
Subclasses need to override this method and return a readable input stream which servers the
PDF document.
|
Fields
A field that generates the instances of this class from the provided Parcel
.
Public Constructors
public
AssetDataProvider
(String assetName)
Default constructor taking the assetName
of a document. The filename/path needs to be
relative to the asset directory.
Parameters
assetName |
Filename of the asset in the application assets folder.
|
Protected Constructors
protected
AssetDataProvider
(Parcel in)
Public Methods
public
int
describeContents
()
public
Uri
getUri
()
Returns the Uri
from which this provided was created.
Returns
- The
Uri
this data provider was created from.
public
void
writeToParcel
(Parcel dest, int flags)
Protected Methods
protected
InputStream
openInputStream
()
Subclasses need to override this method and return a readable input stream which servers the
PDF document. This method must return a new InputStream
instance
every time it is called. This is necessary so InputStreamDataProvider
can actually
"simulate" random data access on the underlying stream.
Returns
- A new instance of the InputStream that servers the PDF document.