FileSpecification

Inheritance: java.lang.Object, com.aspose.pdf.FileSpecification

public final class FileSpecification extends Object

Class representing embedded file.

Constructors

ConstructorDescription
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.
FileSpecificationCreate new empty file specification.

Methods

MethodDescription
getAFRelationshipAssociated file Relationship.
getCollectionItemGets a collection item of the file specification.
getContentsGets contents file.
getContentsInternalGets contents file.
getDescriptionGets text associated with the file specification.
getEncodingGets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.
getEncryptedPayloadGets encrypted payload.
getEngineDictPdf dictionary containing information about the file. Internal only
getEngineObjInternal only
getFileSystemGets name of the file system.
getMIMETypeGets subtype of the embedded file
getNameGets file specification name.
getParamsGets file parameters.
getStreamContentsGets contents of file as stream. Contents is not loaded into memory which allows to decrease memory usage. But this stream does not support positioning and Length property. If you need this features please use Contents property instead.
getUnicodeNameGets file specification unicode name.
getValueGets application-specific parameter.
isIncludeContentsIf true, contents of the file will be included in the file specification.
setAFRelationshipAssociated file Relationship.
setContentsSets contents file.
setContentsSets contents file.
setDescriptionSets text associated with the file specification.
setEncodingSets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.
setFileSystemSets name of the file system.
setIncludeContentsIf true, contents of the file will be included in the file specification.
setMIMETypeSets MIMEType.
setNameSets file specification name.
setParamsSets file parameters.
setUnicodeNameSets file specification unicode name.
setValueSets application-specific parameter.

FileSpecification

public FileSpecification()

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

FileSpecification

Create new empty file specification.

getAFRelationship

public final AFRelationship getAFRelationship()

Associated file Relationship.

Returns: AFRelationship element

getCollectionItem

public final CollectionItem getCollectionItem()

Gets a collection item of the file specification.

Returns: CollectionItem instance

getContents

public InputStream getContents()

Gets contents file.

Returns: InputStream object

getContentsInternal

public com.aspose.ms.System.IO.Stream getContentsInternal()

Gets contents file.

Returns: Stream object

getDescription

public String getDescription()

Gets text associated with the file specification.

Returns: String value

getEncoding

public FileEncoding getEncoding()

Gets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.

Returns: int value @see FileEncoding

getEncryptedPayload

public final EncryptedPayload getEncryptedPayload()

Gets encrypted payload.

Returns: EncryptedPayload instance

getEngineDict

public com.aspose.pdf.engine.data.IPdfDictionary getEngineDict()

Pdf dictionary containing information about the file. Internal only

Returns: IPdfDictionary object

getEngineObj

public com.aspose.pdf.engine.data.IPdfObject getEngineObj()

Internal only

Returns: IPdfObject object

getFileSystem

public String getFileSystem()

Gets name of the file system.

Returns: String value

getMIMEType

public String getMIMEType()

Gets subtype of the embedded file

Returns: string value

getName

public String getName()

Gets file specification name.

Returns: String value

getParams

public FileParams getParams()

Gets file parameters.

Returns: FileParams object

getStreamContents

public InputStream getStreamContents()

Gets contents of file as stream. Contents is not loaded into memory which allows to decrease memory usage. But this stream does not support positioning and Length property. If you need this features please use Contents property instead.

Returns: InputStream object

getUnicodeName

public String getUnicodeName()

Gets file specification unicode name.

Returns: String value

getValue

Gets application-specific parameter.

isIncludeContents

public boolean isIncludeContents()

If true, contents of the file will be included in the file specification.

Returns: boolean value

setAFRelationship

Associated file Relationship.

setContents

public void setContents(byte[] value)

Sets contents file.

Parameters:

ParameterTypeDescription
valuearray of bytes

setContents

Sets contents file.

setDescription

Sets text associated with the file specification.

setEncoding

Sets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.

setFileSystem

Sets name of the file system.

setIncludeContents

public void setIncludeContents(boolean value)

If true, contents of the file will be included in the file specification.

Parameters:

ParameterTypeDescription
valueboolean value

setMIMEType

Sets MIMEType.

setName

Sets file specification name.

setParams

Sets file parameters.

setUnicodeName

Sets file specification unicode name.

setValue

Sets application-specific parameter.