Top Description Constructors Methods
org.apache.pdfbox.pdmodel.common.filespecification

public Class PDEmbeddedFile

extends PDStream
Class Inheritance
Imports
java.io.IOException, .InputStream, java.util.Calendar, org.apache.pdfbox.cos.COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.PDDocument, org.apache.pdfbox.pdmodel.common.PDStream

This represents an embedded file in a file specification.
Author
Ben Litchfield

Constructor Summary

AccessConstructor and Description
public
public
public
public
PDEmbeddedFile(PDDocument doc, InputStream input, COSName
Filter to apply to the stream.
filter
)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The check sum of the file.
getCheckSum
()

Get the check sum of the embedded file.

public Calendar

Returns:

The Creation date.
getCreationDate
()

Get the creation date of the embedded file.

public String

Returns:

The mac Creator.
getMacCreator
()

Get the mac Creator.

public String

Returns:

The mac ResFork.
getMacResFork
()

Get the mac ResFork.

public String

Returns:

The mac subtype.
getMacSubtype
()

Get the mac subtype.

public Calendar

Returns:

The mod date.
getModDate
()

Get the mod date of the embedded file.

public int

Returns:

The size of the embedded file.
getSize
()

Get the size of the embedded file.

public String

Returns:

The type of embedded file.
getSubtype
()

Get the subtype(mimetype) for the embedded file.

public void
setCheckSum(String
The checksum of the file.
checksum
)

Set the check sum.

public void
setCreationDate(Calendar
The new creation date.
creation
)

Set the creation date.

public void
setMacCreator(String
The mac Creator.
macCreator
)

Set the mac Creator.

public void
setMacResFork(String
The mac ResFork.
macResFork
)

Set the mac ResFork.

public void
setMacSubtype(String
The mac subtype.
macSubtype
)

Set the mac subtype.

public void
setModDate(Calendar
The new creation mod.
mod
)

Set the mod date.

public void
setSize(int
The size of the embedded file.
size
)

Set the size of the embedded file.

public void
setSubtype(String
The mimeType for the file.
mimeType
)

Set the subtype for this embedded file.

Inherited from org.apache.pdfbox.pdmodel.common.PDStream:
createInputStreamcreateInputStreamcreateInputStreamcreateOutputStreamcreateOutputStreamgetCOSObjectgetDecodedStreamLengthgetDecodeParmsgetFilegetFileDecodeParamsgetFileFiltersgetFiltersgetLengthgetMetadatasetDecodedStreamLengthsetDecodeParmssetFilesetFileDecodeParamssetFileFilterssetFilterssetMetadatatoByteArray

Constructor Detail

PDEmbeddedFileback to summary
public PDEmbeddedFile(PDDocument document)
PDEmbeddedFileback to summary
public PDEmbeddedFile(COSStream str)
PDEmbeddedFileback to summary
public PDEmbeddedFile(PDDocument doc, InputStream str) throws IOException
PDEmbeddedFileback to summary
public PDEmbeddedFile(PDDocument doc, InputStream input, COSName filter) throws IOException
Parameters
filter:COSName

Filter to apply to the stream.

Exceptions
IOException

Method Detail

getCheckSumback to summary
public String getCheckSum()

Get the check sum of the embedded file.

Returns:String

The check sum of the file.

getCreationDateback to summary
public Calendar getCreationDate() throws IOException

Get the creation date of the embedded file.

Returns:Calendar

The Creation date.

Exceptions
IOException:
If there is an error while constructing the date.
getMacCreatorback to summary
public String getMacCreator()

Get the mac Creator.

Returns:String

The mac Creator.

getMacResForkback to summary
public String getMacResFork()

Get the mac ResFork.

Returns:String

The mac ResFork.

getMacSubtypeback to summary
public String getMacSubtype()

Get the mac subtype.

Returns:String

The mac subtype.

getModDateback to summary
public Calendar getModDate() throws IOException

Get the mod date of the embedded file.

Returns:Calendar

The mod date.

Exceptions
IOException:
If there is an error while constructing the date.
getSizeback to summary
public int getSize()

Get the size of the embedded file.

Returns:int

The size of the embedded file.

getSubtypeback to summary
public String getSubtype()

Get the subtype(mimetype) for the embedded file.

Returns:String

The type of embedded file.

setCheckSumback to summary
public void setCheckSum(String checksum)

Set the check sum.

Parameters
checksum:String

The checksum of the file.

setCreationDateback to summary
public void setCreationDate(Calendar creation)

Set the creation date.

Parameters
creation:Calendar

The new creation date.

setMacCreatorback to summary
public void setMacCreator(String macCreator)

Set the mac Creator.

Parameters
macCreator:String

The mac Creator.

setMacResForkback to summary
public void setMacResFork(String macResFork)

Set the mac ResFork.

Parameters
macResFork:String

The mac ResFork.

setMacSubtypeback to summary
public void setMacSubtype(String macSubtype)

Set the mac subtype.

Parameters
macSubtype:String

The mac subtype.

setModDateback to summary
public void setModDate(Calendar mod)

Set the mod date.

Parameters
mod:Calendar

The new creation mod.

setSizeback to summary
public void setSize(int size)

Set the size of the embedded file.

Parameters
size:int

The size of the embedded file.

setSubtypeback to summary
public void setSubtype(String mimeType)

Set the subtype for this embedded file. This should be a mime type value. Optional.

Parameters
mimeType:String

The mimeType for the file.