Class PDEmbeddedFile
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.common.PDStream
-
- com.tom_roush.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile
-
- All Implemented Interfaces:
COSObjectable
public class PDEmbeddedFile extends PDStream
This represents an embedded file in a file specification.
-
-
Constructor Summary
Constructors Constructor Description PDEmbeddedFile(COSStream str)Constructor.PDEmbeddedFile(PDDocument document)Constructor.PDEmbeddedFile(PDDocument doc, InputStream str)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCheckSum()Get the check sum of the embedded file.CalendargetCreationDate()Get the creation date of the embedded file.StringgetMacCreator()Get the mac Creator.StringgetMacResFork()Get the mac ResFork.StringgetMacSubtype()Get the mac subtype.CalendargetModDate()Get the mod date of the embedded file.intgetSize()Get the size of the embedded file.StringgetSubtype()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(int size)Set the size of the embedded file.voidsetSubtype(String mimeType)Set the subtype for this embedded file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.common.PDStream
addCompression, 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)
Constructor.- Parameters:
document-
-
PDEmbeddedFile
public PDEmbeddedFile(COSStream str)
Constructor.- Parameters:
str- The stream parameter.
-
PDEmbeddedFile
public PDEmbeddedFile(PDDocument doc, InputStream str) throws IOException
Constructor.- Parameters:
doc-str-- Throws:
IOException
-
-
Method Detail
-
setSubtype
public void setSubtype(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 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 Calendar getCreationDate() throws IOException
Get the creation date of the embedded file.- Returns:
- The Creation date.
- Throws:
IOException- If there is an error while constructing the date.
-
setCreationDate
public void setCreationDate(Calendar creation)
Set the creation date.- Parameters:
creation- The new creation date.
-
getModDate
public Calendar getModDate() throws IOException
Get the mod date of the embedded file.- Returns:
- The mod date.
- Throws:
IOException- If there is an error while constructing the date.
-
setModDate
public void setModDate(Calendar mod)
Set the mod date.- Parameters:
mod- The new creation mod.
-
getCheckSum
public String getCheckSum()
Get the check sum of the embedded file.- Returns:
- The check sum of the file.
-
setCheckSum
public void setCheckSum(String checksum)
Set the check sum.- Parameters:
checksum- The checksum of the file.
-
getMacSubtype
public String getMacSubtype()
Get the mac subtype.- Returns:
- The mac subtype.
-
setMacSubtype
public void setMacSubtype(String macSubtype)
Set the mac subtype.- Parameters:
macSubtype- The mac subtype.
-
getMacCreator
public String getMacCreator()
Get the mac Creator.- Returns:
- The mac Creator.
-
setMacCreator
public void setMacCreator(String macCreator)
Set the mac Creator.- Parameters:
macCreator- The mac Creator.
-
getMacResFork
public String getMacResFork()
Get the mac ResFork.- Returns:
- The mac ResFork.
-
setMacResFork
public void setMacResFork(String macResFork)
Set the mac ResFork.- Parameters:
macResFork- The mac ResFork.
-
-