FileSpecification
Inheritance: java.lang.Object, com.aspose.pdf.FileSpecification
public final class FileSpecification extends Object
Class representing embedded file.
Constructors
| Constructor | Description |
|---|---|
| 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. |
Methods
| Method | Description |
|---|---|
| getAFRelationship | Associated file Relationship. |
| getCollectionItem | Gets a collection item of the file specification. |
| getContents | Gets contents file. |
| getContentsInternal | Gets contents file. |
| getDescription | Gets text associated with the file specification. |
| getEncoding | Gets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed. |
| getEncryptedPayload | Gets encrypted payload. |
| getEngineDict | Pdf dictionary containing information about the file. Internal only |
| getEngineObj | Internal only |
| getFileSystem | Gets name of the file system. |
| getMIMEType | Gets subtype of the embedded file |
| getName | Gets file specification name. |
| getParams | Gets file parameters. |
| 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. |
| getUnicodeName | Gets file specification unicode name. |
| getValue | Gets application-specific parameter. |
| isIncludeContents | If true, contents of the file will be included in the file specification. |
| setAFRelationship | Associated file Relationship. |
| setContents | Sets contents file. |
| 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 | If true, contents of the file will be included in the file specification. |
| setMIMEType | Sets MIMEType. |
| setName | Sets file specification name. |
| setParams | Sets file parameters. |
| setUnicodeName | Sets file specification unicode name. |
| setValue | Sets 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:
| Parameter | Type | Description |
|---|---|---|
| value | array 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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setMIMEType
Sets MIMEType.
setName
Sets file specification name.
setParams
Sets file parameters.
setUnicodeName
Sets file specification unicode name.
setValue
Sets application-specific parameter.