org.pdfbox.cos

Class COSObject

Implemented Interfaces:
COSObjectable

public class COSObject
extends COSBase

This class represents a PDF object.
Version:
$Revision: 1.37 $
Author:
Ben Litchfield

Constructor Summary

COSObject(COSBase object)
Constructor.

Method Summary

Object
accept(ICOSVisitor visitor)
visitor pattern double dispatch method.
COSBase
getDictionaryObject(COSName key)
This will get the dictionary object in this object that has the name key and if it is a pdfobjref then it will dereference that and return it.
COSInteger
getGenerationNumber()
Getter for property generationNumber.
COSBase
getItem(COSName key)
This will get the dictionary object in this object that has the name key.
COSBase
getObject()
This will get the object that this object encapsulates.
COSInteger
getObjectNumber()
Getter for property objectNumber.
void
setGenerationNumber(COSInteger generationNumberValue)
Setter for property generationNumber.
void
setObject(COSBase object)
This will set the object that this object encapsulates.
void
setObjectNumber(COSInteger objectNum)
Setter for property objectNumber.
String
toString()

Methods inherited from class org.pdfbox.cos.COSBase

accept, getCOSObject, getFilterManager

Constructor Details

COSObject

public COSObject(COSBase object)
            throws IOException
Constructor.
Parameters:
object - The object that this encapsulates.

Method Details

accept

public Object accept(ICOSVisitor visitor)
            throws COSVisitorException
visitor pattern double dispatch method.
Overrides:
accept in interface COSBase
Parameters:
visitor - The object to notify when visiting this object.
Returns:
any object, depending on the visitor implementation, or null
Throws:
COSVisitorException - If an error occurs while visiting this object.

getDictionaryObject

public COSBase getDictionaryObject(COSName key)
This will get the dictionary object in this object that has the name key and if it is a pdfobjref then it will dereference that and return it.
Parameters:
key - The key to the value that we are searching for.
Returns:
The pdf object that matches the key.

getGenerationNumber

public COSInteger getGenerationNumber()
Getter for property generationNumber.
Returns:
Value of property generationNumber.

getItem

public COSBase getItem(COSName key)
This will get the dictionary object in this object that has the name key.
Parameters:
key - The key to the value that we are searching for.
Returns:
The pdf object that matches the key.

getObject

public COSBase getObject()
This will get the object that this object encapsulates.
Returns:
The encapsulated object.

getObjectNumber

public COSInteger getObjectNumber()
Getter for property objectNumber.
Returns:
Value of property objectNumber.

setGenerationNumber

public void setGenerationNumber(COSInteger generationNumberValue)
Setter for property generationNumber.
Parameters:
generationNumberValue - New value of property generationNumber.

setObject

public void setObject(COSBase object)
            throws IOException
This will set the object that this object encapsulates.
Parameters:
object - The new object to encapsulate.

setObjectNumber

public void setObjectNumber(COSInteger objectNum)
Setter for property objectNumber.
Parameters:
objectNum - New value of property objectNumber.

toString

public String toString()