FileSpecification

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

NameTypeAccessDescription
nameStringRead/F — file name.
unicodeFileNameStringRead/UF — Unicode file name.
descriptionStringRead/Desc — description.
relationshipStringRead/AFRelationship.
mIMETypeStringReadMIME type from embedded stream /Subtype.
paramsFileParamsReadReturns file params (size, dates, checksum).
contentsInputStreamReadReturns the embedded file contents as an InputStream.
mimeTypeStringReadReturns the MIME type (alias for {@link #getMIMEType()}).
databyte[]ReadReturns the embedded file data.
embeddedStreamPdfStreamReadReturns the embedded file stream from /EF/F.
pdfDictionaryPdfDictionaryReadReturns the underlying dictionary.

Methods

SignatureDescription
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()StringMIME type from embedded stream /Subtype.
setMIMEType(mimeType: String)Sets the MIME type on the embedded stream.
getParams()FileParamsReturns file params (size, dates, checksum).
getContents()InputStreamReturns the embedded file contents as an InputStream.
setMimeType(mimeType: String)Sets the MIME type (alias for {@link #setMIMEType(String)}).
getMimeType()StringReturns the MIME type (alias for {@link #getMIMEType()}).
getData()byte[]Returns the embedded file data.
getEmbeddedStream()PdfStreamReturns the embedded file stream from /EF/F.
getPdfDictionary()PdfDictionaryReturns the underlying dictionary.

See Also

 English