org.pdfbox.cos
Class COSObject
- COSObjectable
This class represents a PDF object.
COSObject
public COSObject(COSBase object)
throws IOException
Constructor.
object
- The object that this encapsulates.
accept
public Object accept(ICOSVisitor visitor)
throws COSVisitorException
visitor pattern double dispatch method.
- accept in interface COSBase
visitor
- The object to notify when visiting this object.
- any object, depending on the visitor implementation, or null
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.
key
- The key to the value that we are searching for.
- The pdf object that matches the key.
getGenerationNumber
public COSInteger getGenerationNumber()
Getter for property generationNumber.
- Value of property generationNumber.
getItem
public COSBase getItem(COSName key)
This will get the dictionary object in this object that has the name key.
key
- The key to the value that we are searching for.
- The pdf object that matches the key.
getObject
public COSBase getObject()
This will get the object that this object encapsulates.
getObjectNumber
public COSInteger getObjectNumber()
Getter for property objectNumber.
- Value of property objectNumber.
setGenerationNumber
public void setGenerationNumber(COSInteger generationNumberValue)
Setter for property generationNumber.
generationNumberValue
- New value of property generationNumber.
setObject
public void setObject(COSBase object)
throws IOException
This will set the object that this object encapsulates.
object
- The new object to encapsulate.
setObjectNumber
public void setObjectNumber(COSInteger objectNum)
Setter for property objectNumber.
objectNum
- New value of property objectNumber.
toString
public String toString()