public final class FileSpecification extends Object implements com.aspose.ms.System.IDisposable
Class representing embedded file.
Constructor and Description |
---|
FileSpecification()
Create new empty file specification.
|
FileSpecification(InputStream stream,
String name)
Constructor for file specification.
|
FileSpecification(InputStream stream,
String name,
String description)
Constructor for FileSpecification.
|
FileSpecification(com.aspose.pdf.engine.data.IPdfPrimitive specification)
File specification
|
FileSpecification(com.aspose.ms.System.IO.Stream stream,
String name)
Constructor for file specification.
|
FileSpecification(com.aspose.ms.System.IO.Stream stream,
String name,
String description)
Constructor for FileSpecification.
|
FileSpecification(String file)
Constructor for FileSpecification
|
FileSpecification(String fileName,
Annotation annot)
Constructor for FileSpecification.
|
FileSpecification(String file,
String description)
Constructor for FileSpecification.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this object
|
InputStream |
getContents()
Gets contents file.
|
com.aspose.ms.System.IO.Stream |
getContentsInternal()
Gets contents file.
|
String |
getDescription()
Gets text associated with the file specification.
|
int |
getEncoding()
Gets encoding format.
|
com.aspose.pdf.engine.data.IPdfDictionary |
getEngineDict()
Pdf dictionary containing information about the file.
|
com.aspose.pdf.engine.data.IPdfObject |
getEngineObj()
Internal only
|
String |
getFileSystem()
Gets name of the file system.
|
String |
getMIMEType()
Gets subtype of the embedded file
|
String |
getName()
Gets file specification name.
|
FileParams |
getParams()
Gets file paramteres.
|
InputStream |
getStreamContents()
Gets contents of file as stream.
|
String |
getUnicodeName()
Gets file specification unicode name.
|
boolean |
isIncludeContents()
If true, contents of the file will be included in the file specification.
|
void |
setContents(InputStream value)
Sets contents file.
|
void |
setDescription(String value)
Sets text associated with the file specification.
|
void |
setEncoding(int value)
Sets encoding format.
|
void |
setFileSystem(String value)
Sets name of the file system.
|
void |
setIncludeContents(boolean value)
If true, contents of the file will be included in the file specification.
|
void |
setMIMEType(String value)
Sets MIMEType.
|
void |
setName(String value)
Sets file specification name.
|
void |
setParams(FileParams value)
Sets file paramteres.
|
void |
setUnicodeName(String value)
Sets file specification unicode name.
|
public FileSpecification(com.aspose.pdf.engine.data.IPdfPrimitive specification)
File specification
specification
- IPdfPrimitive objectpublic FileSpecification(String file)
Constructor for FileSpecification
file
- File path.public FileSpecification(com.aspose.ms.System.IO.Stream stream, String name)
Constructor for file specification.
stream
- Stream containing data file.name
- File specification.public FileSpecification(InputStream stream, String name)
Constructor for file specification.
stream
- Stream containing data file.name
- File specification.public FileSpecification(String file, String description)
Constructor for FileSpecification.
file
- File path.description
- File description.public FileSpecification(com.aspose.ms.System.IO.Stream stream, String name, String description)
Constructor for FileSpecification.
stream
- Stream to be used in the document.name
- A file specification string.description
- File description.public FileSpecification(InputStream stream, String name, String description)
Constructor for FileSpecification.
stream
- Stream to be used in the document.name
- A file specification string.description
- File description.public FileSpecification(String fileName, Annotation annot)
Constructor for FileSpecification.
fileName
- String objectannot
- Annotation objectpublic FileSpecification()
Create new empty file specification.
public int getEncoding()
Gets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.
FileEncoding
public void setEncoding(int value)
Sets encoding format. Possible values: Zip - file is compressed with ZIP, None - file is not compressed.
value
- int valueFileEncoding
public boolean isIncludeContents()
If true, contents of the file will be included in the file specification.
public void setIncludeContents(boolean value)
If true, contents of the file will be included in the file specification.
value
- boolean valuepublic com.aspose.pdf.engine.data.IPdfDictionary getEngineDict()
Pdf dictionary containing information about the file. Internal only
public com.aspose.pdf.engine.data.IPdfObject getEngineObj()
Internal only
public String getDescription()
Gets text associated with the file specification.
public void setDescription(String value)
Sets text associated with the file specification.
value
- String valuepublic 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.
public com.aspose.ms.System.IO.Stream getContentsInternal()
Gets contents file.
public InputStream getContents()
Gets contents file.
public void setContents(InputStream value)
Sets contents file.
value
- InputStream objectpublic FileParams getParams()
Gets file paramteres.
public void setParams(FileParams value)
Sets file paramteres.
value
- FileParams objectpublic String getMIMEType()
Gets subtype of the embedded file
public void setMIMEType(String value)
Sets MIMEType.
value
- String valuepublic String getName()
Gets file specification name.
public void setName(String value)
Sets file specification name.
value
- String valuepublic String getUnicodeName()
Gets file specification unicode name.
public void setUnicodeName(String value)
Sets file specification unicode name.
value
- String valuepublic String getFileSystem()
Gets name of the file system.
public void setFileSystem(String value)
Sets name of the file system.
value
- String valuepublic void dispose()
dispose
in interface com.aspose.ms.System.IDisposable