| java.lang.Object | |
| ↳ | com.pspdfkit.document.files.EmbeddedFileSource |
Represents a source of embedded file data.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
EmbeddedFileSource(DataProvider fileDataProvider, String fileName, String fileDescription)
Constructs an embedded file source with data served from
DataProvider. | |||||||||||
|
EmbeddedFileSource(Uri fileUri, String fileName, String fileDescription)
Constructs an embedded file source with data served from file content provider URI.
| |||||||||||
|
EmbeddedFileSource(byte[] fileData, String fileName, String fileDescription)
Constructs an embedded file source with data served from memory.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DataProvider |
getDataProvider()
Returns data provider with data for the embedded file.
| ||||||||||
| String |
getFileDescription()
Returns file description.
| ||||||||||
| String |
getFileName()
Returns name of the file.
| ||||||||||
| long |
getFileSize()
Returns file size.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Constructs an embedded file source with data served from DataProvider.
| fileDataProvider | Provider for file's data that will be saved in the document. |
|---|---|
| fileName | User displayable name of the file. |
| fileDescription | The optional description of the file. If set, it will override the file annotation's contents (getContents()).
|
Constructs an embedded file source with data served from file content provider URI.
| fileUri | A content provider URI with supported scheme (content:// or file://). |
|---|---|
| fileName | User displayable name of the file. |
| fileDescription | The optional description of the file. If set, it will override the file annotation's contents (getContents()).
|
Constructs an embedded file source with data served from memory.
| fileData | File data that will be saved in the document. |
|---|---|
| fileName | User displayable name of the file. |
| fileDescription | The optional description of the file. If set, it will override the file annotation's contents (getContents()).
|
Returns data provider with data for the embedded file.
Returns file description.
null if not set.
Returns file size.
FILE_SIZE_UNKNOWN if size could not be determined.