java.lang.Object | |
↳ | com.pspdfkit.document.DocumentSource |
Represents a document source which may be a DataProvider
or a file Uri.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DocumentSource(Uri fileUri)
Creates a new
DocumentSource with file Uri as a source. | |||||||||||
DocumentSource(Uri fileUri, String password)
Creates a new
DocumentSource with file Uri as a source. | |||||||||||
DocumentSource(Uri fileUri, String password, String contentSignature)
Creates a new
DocumentSource with file Uri as a source. | |||||||||||
DocumentSource(DataProvider dataProvider)
Creates a new
DocumentSource with a DataProvider as a source. | |||||||||||
DocumentSource(DataProvider dataProvider, String password)
Creates a new
DocumentSource with a DataProvider as a source. | |||||||||||
DocumentSource(DataProvider dataProvider, String password, String contentSignature)
Creates a new
DocumentSource with a DataProvider as a source. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DocumentSource |
cloneWithPassword(String newPassword)
Returns a copy of this source with new password set.
| ||||||||||
boolean | equals(Object o) | ||||||||||
String |
getContentSignature()
Returns content signature of the document if any was set.
| ||||||||||
DataProvider |
getDataProvider()
Returns a
DataProvider for this source. | ||||||||||
Uri |
getFileUri()
Returns a file
Uri if this is an Uri source. | ||||||||||
String |
getPassword()
Returns password for unlocking currently pointed to file.
| ||||||||||
synchronized String |
getUid()
Returns Uid of this document source.
| ||||||||||
int | hashCode() | ||||||||||
boolean |
isFileSource()
Returns true if the source is a file URI not a data provider.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a new DocumentSource
with file Uri as a source.
fileUri | Uri of the PDF file. |
---|
Creates a new DocumentSource
with file Uri as a source.
fileUri | Uri of the PDF file. |
---|---|
password | Password to unlock the file. Can be null if no password is required.
|
Creates a new DocumentSource
with file Uri as a source.
fileUri | Uri of the PDF file. |
---|---|
password | Password to unlock the file. Can be null if no password is required. |
contentSignature | An RSA encrypted SHA256 hash of the document if required by license,
may be null .
|
Creates a new DocumentSource
with a DataProvider
as a source.
dataProvider | DataProvider for accessing the document to open.
|
---|
Creates a new DocumentSource
with a DataProvider
as a source.
dataProvider | DataProvider for accessing the document to open. |
---|---|
password | Password to unlock the PDF. Can be null if no password is required.
|
Creates a new DocumentSource
with a DataProvider
as a source.
dataProvider | DataProvider for accessing the document to open. |
---|---|
password | Password to unlock the PDF. Can be null if no password is required. |
contentSignature | An RSA encrypted SHA256 hash of the document if required by license,
may be null .
|
Returns a copy of this source with new password set.
newPassword | new password value, can be null |
---|
DocumentSource
.
Returns content signature of the document if any was set.
null
if none is set.
Returns a DataProvider
for this source.
DataProvider
this source points to or null
if this is a file Uri
source.
Returns a file Uri
if this is an Uri source.
Uri
of the file or null
if this source points to a DataProvider
.
Returns password for unlocking currently pointed to file.
null
if none is set.
Returns true if the source is a file URI not a data provider.
true
if this source has file Uri, false
if not.