Class PDEmbeddedFile
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.common.PDStream
-
- org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile
-
- All Implemented Interfaces:
COSObjectable
public class PDEmbeddedFile extends PDStream
This represents an embedded file in a file specification.- Author:
- Ben Litchfield
-
-
Constructor Summary
Constructors Constructor Description PDEmbeddedFile(COSStream str)PDEmbeddedFile(PDDocument document)PDEmbeddedFile(PDDocument doc, java.io.InputStream str)PDEmbeddedFile(PDDocument doc, java.io.InputStream input, COSName filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCheckSum()Get the check sum of the embedded file.java.util.CalendargetCreationDate()Get the creation date of the embedded file.java.lang.StringgetMacCreator()Get the mac Creator.java.lang.StringgetMacResFork()Get the mac ResFork.java.lang.StringgetMacSubtype()Get the mac subtype.java.util.CalendargetModDate()Get the mod date of the embedded file.intgetSize()Get the size of the embedded file.java.lang.StringgetSubtype()Get the subtype(mimetype) for the embedded file.voidsetCheckSum(java.lang.String checksum)Set the check sum.voidsetCreationDate(java.util.Calendar creation)Set the creation date.voidsetMacCreator(java.lang.String macCreator)Set the mac Creator.voidsetMacResFork(java.lang.String macResFork)Set the mac ResFork.voidsetMacSubtype(java.lang.String macSubtype)Set the mac subtype.voidsetModDate(java.util.Calendar mod)Set the mod date.voidsetSize(int size)Set the size of the embedded file.voidsetSubtype(java.lang.String mimeType)Set the subtype for this embedded file.-
Methods inherited from class org.apache.pdfbox.pdmodel.common.PDStream
addCompression, createInputStream, createInputStream, createInputStream, createOutputStream, createOutputStream, getCOSObject, getDecodedStreamLength, getDecodeParms, getFile, getFileDecodeParams, getFileFilters, getFilters, getLength, getMetadata, getStream, setDecodedStreamLength, setDecodeParms, setFile, setFileDecodeParams, setFileFilters, setFilters, setMetadata, toByteArray
-
-
-
-
Constructor Detail
-
PDEmbeddedFile
public PDEmbeddedFile(PDDocument document)
-
PDEmbeddedFile
public PDEmbeddedFile(COSStream str)
-
PDEmbeddedFile
public PDEmbeddedFile(PDDocument doc, java.io.InputStream str) throws java.io.IOException
- Throws:
java.io.IOException
-
PDEmbeddedFile
public PDEmbeddedFile(PDDocument doc, java.io.InputStream input, COSName filter) throws java.io.IOException
- Parameters:
filter- Filter to apply to the stream.- Throws:
java.io.IOException
-
-
Method Detail
-
setSubtype
public void setSubtype(java.lang.String mimeType)
Set the subtype for this embedded file. This should be a mime type value. Optional.- Parameters:
mimeType- The mimeType for the file.
-
getSubtype
public java.lang.String 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(int size)
Set the size of the embedded file.- Parameters:
size- The size of the embedded file.
-
getCreationDate
public java.util.Calendar getCreationDate() throws java.io.IOExceptionGet the creation date of the embedded file.- Returns:
- The Creation date.
- Throws:
java.io.IOException- If there is an error while constructing the date.
-
setCreationDate
public void setCreationDate(java.util.Calendar creation)
Set the creation date.- Parameters:
creation- The new creation date.
-
getModDate
public java.util.Calendar getModDate() throws java.io.IOExceptionGet the mod date of the embedded file.- Returns:
- The mod date.
- Throws:
java.io.IOException- If there is an error while constructing the date.
-
setModDate
public void setModDate(java.util.Calendar mod)
Set the mod date.- Parameters:
mod- The new creation mod.
-
getCheckSum
public java.lang.String getCheckSum()
Get the check sum of the embedded file.- Returns:
- The check sum of the file.
-
setCheckSum
public void setCheckSum(java.lang.String checksum)
Set the check sum.- Parameters:
checksum- The checksum of the file.
-
getMacSubtype
public java.lang.String getMacSubtype()
Get the mac subtype.- Returns:
- The mac subtype.
-
setMacSubtype
public void setMacSubtype(java.lang.String macSubtype)
Set the mac subtype.- Parameters:
macSubtype- The mac subtype.
-
getMacCreator
public java.lang.String getMacCreator()
Get the mac Creator.- Returns:
- The mac Creator.
-
setMacCreator
public void setMacCreator(java.lang.String macCreator)
Set the mac Creator.- Parameters:
macCreator- The mac Creator.
-
getMacResFork
public java.lang.String getMacResFork()
Get the mac ResFork.- Returns:
- The mac ResFork.
-
setMacResFork
public void setMacResFork(java.lang.String macResFork)
Set the mac ResFork.- Parameters:
macResFork- The mac ResFork.
-
-