public class

EmbeddedFileSource

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.files.EmbeddedFileSource

Class Overview

Represents a source of embedded file data.

Summary

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

Public Constructors

public EmbeddedFileSource (DataProvider fileDataProvider, String fileName, String fileDescription)

Constructs an embedded file source with data served from DataProvider.

Parameters
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()).

public EmbeddedFileSource (Uri fileUri, String fileName, String fileDescription)

Constructs an embedded file source with data served from file content provider URI.

Parameters
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()).

public EmbeddedFileSource (byte[] fileData, String fileName, String fileDescription)

Constructs an embedded file source with data served from memory.

Parameters
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()).

Public Methods

public DataProvider getDataProvider ()

Returns data provider with data for the embedded file.

Returns
  • Instance of data provider serving file's data.

public String getFileDescription ()

Returns file description.

Returns
  • File description or null if not set.

public String getFileName ()

Returns name of the file.

public long getFileSize ()

Returns file size.

Returns