Module org.sejda.sambox
Class PDEmbeddedFile
java.lang.Object
org.sejda.sambox.pdmodel.common.PDStream
org.sejda.sambox.pdmodel.common.filespecification.PDEmbeddedFile
- All Implemented Interfaces:
COSObjectable
This represents an embedded file in a file specification.
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.PDEmbeddedFile(InputStream input, COSName filter) PDEmbeddedFile(COSStream str) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the check sum of the embedded file.Get the creation date of the embedded file.Get the mac Creator.Get the mac ResFork.Get the mac subtype.Get the mod date of the embedded file.intgetSize()Get the size of the embedded file.Get the subtype(mimetype) for the embedded file.voidsetCheckSum(String checksum) Set the check sum.voidsetCreationDate(Calendar creation) Set the creation date.voidsetMacCreator(String macCreator) Set the mac Creator.voidsetMacResFork(String macResFork) Set the mac ResFork.voidsetMacSubtype(String macSubtype) Set the mac subtype.voidsetModDate(Calendar mod) Set the mod date.voidsetSize(long size) Set the size of the embedded file.voidsetSubtype(String mimeType) Set the subtype for this embedded file.Methods inherited from class org.sejda.sambox.pdmodel.common.PDStream
createInputStream, createOutputStream, createOutputStream, getCOSObject, getDecodedStreamLength, getDecodeParms, getFile, getFileDecodeParams, getFileFilters, getFilters, getLength, getMetadata, setDecodedStreamLength, setDecodeParms, setFile, setFileDecodeParams, setFileFilters, setFilters, setMetadata, toByteArray
-
Constructor Details
-
PDEmbeddedFile
Constructor.- Parameters:
str- The stream parameter.
-
PDEmbeddedFile
Constructor.- Parameters:
str-- Throws:
IOException
-
PDEmbeddedFile
- Throws:
IOException
-
-
Method Details
-
setSubtype
Set the subtype for this embedded file. This should be a mime type value. Optional.- Parameters:
mimeType- The mimeType for the file.
-
getSubtype
Get the subtype(mimetype) for the embedded file.- Returns:
- The type of embedded file.
-
getSize
public int getSize()Get the size of the embedded file.- Returns:
- The size of the embedded file.
-
setSize
public void setSize(long size) Set the size of the embedded file.- Parameters:
size- The size of the embedded file.
-
getCreationDate
Get the creation date of the embedded file.- Returns:
- The Creation date.
- Throws:
IOException- If there is an error while constructing the date.
-
setCreationDate
Set the creation date.- Parameters:
creation- The new creation date.
-
getModDate
Get the mod date of the embedded file.- Returns:
- The mod date.
- Throws:
IOException- If there is an error while constructing the date.
-
setModDate
Set the mod date.- Parameters:
mod- The new creation mod.
-
getCheckSum
Get the check sum of the embedded file.- Returns:
- The check sum of the file.
-
setCheckSum
Set the check sum.- Parameters:
checksum- The checksum of the file.
-
getMacSubtype
Get the mac subtype.- Returns:
- The mac subtype.
-
setMacSubtype
Set the mac subtype.- Parameters:
macSubtype- The mac subtype.
-
getMacCreator
Get the mac Creator.- Returns:
- The mac Creator.
-
setMacCreator
Set the mac Creator.- Parameters:
macCreator- The mac Creator.
-
getMacResFork
Get the mac ResFork.- Returns:
- The mac ResFork.
-
setMacResFork
Set the mac ResFork.- Parameters:
macResFork- The mac ResFork.
-