org.pdfbox.pdmodel.common.filespecification

Class PDEmbeddedFile

Implemented Interfaces:
COSObjectable

public class PDEmbeddedFile
extends PDStream

This represents an embedded file in a file specification.
Version:
$Revision: 1.2 $
Author:
Ben Litchfield

Constructor Summary

PDEmbeddedFile(COSStream str)
Constructor.
PDEmbeddedFile(PDDocument document)
Constructor.
PDEmbeddedFile(PDDocument doc, InputStream str)
Constructor.
PDEmbeddedFile(PDDocument doc, InputStream str, boolean filtered)
Constructor.

Method Summary

String
getCheckSum()
Get the check sum of the embedded file.
Calendar
getCreationDate()
Get the creation date of the embedded file.
String
getMacCreator()
Get the mac Creator.
String
getMacResFork()
Get the mac ResFork.
String
getMacSubtype()
Get the mac subtype.
Calendar
getModDate()
Get the mod date of the embedded file.
int
getSize()
Get the size of the embedded file.
String
getSubtype()
Get the subtype(mimetype) for the embedded file.
void
setCheckSum(String checksum)
Set the check sum.
void
setCreationDate(Calendar creation)
Set the creation date.
void
setMacCreator(String macCreator)
Set the mac Creator.
void
setMacResFork(String macResFork)
Set the mac ResFork.
void
setMacSubtype(String macSubtype)
Set the mac subtype.
void
setModDate(Calendar mod)
Set the mod date.
void
setSize(int size)
Set the size of the embedded file.
void
setSubtype(String mimeType)
Set the subtype for this embedded file.

Methods inherited from class org.pdfbox.pdmodel.common.PDStream

addCompression, createFromCOS, createInputStream, createOutputStream, getByteArray, getCOSObject, getDecodeParams, getFile, getFileDecodeParams, getFileFilters, getFilters, getInputStreamAsString, getLength, getMetadata, getPartiallyFilteredStream, getStream, setDecodeParams, setFile, setFileDecodeParams, setFileFilters, setFilters, setMetadata

Constructor Details

PDEmbeddedFile

public PDEmbeddedFile(COSStream str)
Constructor.
Parameters:
str - The stream parameter.

PDEmbeddedFile

public PDEmbeddedFile(PDDocument document)
Constructor.
Parameters:
document -

PDEmbeddedFile

public PDEmbeddedFile(PDDocument doc,
                      InputStream str)
            throws IOException
Constructor.
Parameters:
doc -
str -

PDEmbeddedFile

public PDEmbeddedFile(PDDocument doc,
                      InputStream str,
                      boolean filtered)
            throws IOException
Constructor.
Parameters:
doc -
str -
filtered -

Method Details

getCheckSum

public String getCheckSum()
Get the check sum of the embedded file.
Returns:
The check sum of the file.

getCreationDate

public Calendar getCreationDate()
            throws IOException
Get the creation date of the embedded file.
Returns:
The Creation date.

getMacCreator

public String getMacCreator()
Get the mac Creator.
Returns:
The mac Creator.

getMacResFork

public String getMacResFork()
Get the mac ResFork.
Returns:
The mac ResFork.

getMacSubtype

public String getMacSubtype()
Get the mac subtype.
Returns:
The mac subtype.

getModDate

public Calendar getModDate()
            throws IOException
Get the mod date of the embedded file.
Returns:
The mod date.

getSize

public int getSize()
Get the size of the embedded file.
Returns:
The size of the embedded file.

getSubtype

public String getSubtype()
Get the subtype(mimetype) for the embedded file.
Returns:
The type of embedded file.

setCheckSum

public void setCheckSum(String checksum)
Set the check sum.
Parameters:
checksum - The checksum of the file.

setCreationDate

public void setCreationDate(Calendar creation)
Set the creation date.
Parameters:
creation - The new creation date.

setMacCreator

public void setMacCreator(String macCreator)
Set the mac Creator.
Parameters:
macCreator - The mac Creator.

setMacResFork

public void setMacResFork(String macResFork)
Set the mac ResFork.
Parameters:
macResFork - The mac ResFork.

setMacSubtype

public void setMacSubtype(String macSubtype)
Set the mac subtype.
Parameters:
macSubtype - The mac subtype.

setModDate

public void setModDate(Calendar mod)
Set the mod date.
Parameters:
mod - The new creation mod.

setSize

public void setSize(int size)
Set the size of the embedded file.
Parameters:
size - The size of the embedded file.

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.