FileSpecification
Overview
FileSpecification is a class in Aspose.PDF FOSS for Java.
Represents an embedded file specification (ISO 32000-1:2008, §7.11.3, Table 44).
This class provides 21 methods for working with FileSpecification objects in Java programs.
Available methods include: FileSpecification, getContents, getData, getDescription, getEmbeddedStream, getMIMEType, getMimeType, getName, getParams, getPdfDictionary, getRelationship, getUnicodeFileName, and 6 additional methods.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: contents, data, description, embeddedStream, mIMEType, mimeType, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
name | String | Read | /F — file name. |
unicodeFileName | String | Read | /UF — Unicode file name. |
description | String | Read | /Desc — description. |
relationship | String | Read | /AFRelationship. |
mIMEType | String | Read | MIME type from embedded stream /Subtype. |
params | FileParams | Read | Returns file params (size, dates, checksum). |
contents | InputStream | Read | Returns the embedded file contents as an InputStream. |
mimeType | String | Read | Returns the MIME type (alias for {@link #getMIMEType()}). |
data | byte[] | Read | Returns the embedded file data. |
embeddedStream | PdfStream | Read | Returns the embedded file stream from /EF/F. |
pdfDictionary | PdfDictionary | Read | Returns the underlying dictionary. |
Methods
| Signature | Description |
|---|---|
FileSpecification(dict: PdfDictionary) | Wraps an existing file specification dictionary. |
FileSpecification(file: String) | Creates a file specification from {@code file}, with no description. |
FileSpecification(file: String, description: String) | Creates a file specification with the given file name and description. |
FileSpecification(stream: InputStream, name: String) | Creates a file specification from an InputStream. |
getName() → String | /F — file name. |
setName(name: String) | Sets the file name (/F). |
getUnicodeFileName() → String | /UF — Unicode file name. |
setUnicodeFileName(name: String) | Sets the Unicode file name (/UF). |
getDescription() → String | /Desc — description. |
setDescription(desc: String) | Sets the description (/Desc). |
getRelationship() → String | /AFRelationship. |
setRelationship(rel: String) | Sets the AF relationship. |
getMIMEType() → String | MIME type from embedded stream /Subtype. |
setMIMEType(mimeType: String) | Sets the MIME type on the embedded stream. |
getParams() → FileParams | Returns file params (size, dates, checksum). |
getContents() → InputStream | Returns the embedded file contents as an InputStream. |
setMimeType(mimeType: String) | Sets the MIME type (alias for {@link #setMIMEType(String)}). |
getMimeType() → String | Returns the MIME type (alias for {@link #getMIMEType()}). |
getData() → byte[] | Returns the embedded file data. |
getEmbeddedStream() → PdfStream | Returns the embedded file stream from /EF/F. |
getPdfDictionary() → PdfDictionary | Returns the underlying dictionary. |