Package com.itextpdf.kernel.pdf.filespec
Class PdfEncryptedPayloadFileSpecFactory
- java.lang.Object
-
- com.itextpdf.kernel.pdf.filespec.PdfEncryptedPayloadFileSpecFactory
-
public class PdfEncryptedPayloadFileSpecFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PdfEncryptedPayloadFileSpecFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static PdfFileSpec
addEncryptedPayloadDictionary(PdfFileSpec fs, PdfEncryptedPayload ep)
static PdfFileSpec
create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload, PdfName mimeType)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload, PdfName mimeType)
Embed a encrypted payload to a PdfDocument.static PdfFileSpec
create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.static java.lang.String
generateDescription(PdfEncryptedPayload ep)
static java.lang.String
generateFileDisplay(PdfEncryptedPayload ep)
static PdfFileSpec
wrap(PdfDictionary dictionary)
-
-
-
Method Detail
-
create
public static PdfFileSpec create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofileStore
- byte[] containing encrypted fileencryptedPayload
- the encrypted payload dictionarymimeType
- mime-type of the filefileParameter
- Pdfdictionary containing file parameters- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
create
public static PdfFileSpec create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofileStore
- byte[] containing the fileencryptedPayload
- the encrypted payload dictionaryfileParameter
- Pdfdictionary containing file parameters- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
create
public static PdfFileSpec create(PdfDocument doc, byte[] fileStore, PdfEncryptedPayload encryptedPayload)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofileStore
- byte[] containing the fileencryptedPayload
- the encrypted payload dictionary- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
create
public static PdfFileSpec create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter) throws java.io.IOException
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofilePath
- path to the encrypted fileencryptedPayload
- the encrypted payload dictionarymimeType
- mime-type of the filefileParameter
- Pdfdictionary containing file parameters- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
- Throws:
java.io.IOException
- in case of any I/O error
-
create
public static PdfFileSpec create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload, PdfName mimeType) throws java.io.IOException
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofilePath
- path to the encrypted fileencryptedPayload
- the encrypted payload dictionarymimeType
- mime-type of the file- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
- Throws:
java.io.IOException
- in case of any I/O error
-
create
public static PdfFileSpec create(PdfDocument doc, java.lang.String filePath, PdfEncryptedPayload encryptedPayload) throws java.io.IOException
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tofilePath
- path to the encrypted fileencryptedPayload
- the encrypted payload dictionary- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
- Throws:
java.io.IOException
- in case of any I/O error
-
create
public static PdfFileSpec create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload, PdfName mimeType, PdfDictionary fileParameter)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tois
- stream containing encrypted fileencryptedPayload
- the encrypted payload dictionarymimeType
- mime-type of the filefileParameter
- Pdfdictionary containing file parameters- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
create
public static PdfFileSpec create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload, PdfName mimeType)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tois
- stream containing encrypted fileencryptedPayload
- the encrypted payload dictionarymimeType
- mime-type of the file- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
create
public static PdfFileSpec create(PdfDocument doc, java.io.InputStream is, PdfEncryptedPayload encryptedPayload)
Embed a encrypted payload to a PdfDocument.- Parameters:
doc
- PdfDocument to add the file tois
- stream containing encrypted fileencryptedPayload
- the encrypted payload dictionary- Returns:
- PdfFileSpec containing the file specification of the encrypted payload
-
wrap
public static PdfFileSpec wrap(PdfDictionary dictionary)
-
generateDescription
public static java.lang.String generateDescription(PdfEncryptedPayload ep)
-
generateFileDisplay
public static java.lang.String generateFileDisplay(PdfEncryptedPayload ep)
-
addEncryptedPayloadDictionary
private static PdfFileSpec addEncryptedPayloadDictionary(PdfFileSpec fs, PdfEncryptedPayload ep)
-
-