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

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.
embeddedStreamCOSStreamReadReturns the embedded file stream from /EF/F.
cOSDictionaryCOSDictionaryReadReturns the underlying dictionary.

Methods

SignatureDescription
FileSpecification(dict: COSDictionary)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()COSStreamReturns the embedded file stream from /EF/F.
getCOSDictionary()COSDictionaryReturns the underlying dictionary.

See Also