Top Description Fields Constructors Methods
org.apache.pdfbox.cos

public abstract Class COSBase

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Known Direct Subclasses
org.apache.pdfbox.cos.COSBoolean, org.apache.pdfbox.cos.COSDictionary, org.apache.pdfbox.cos.COSDocument, org.apache.pdfbox.cos.COSName, org.apache.pdfbox.cos.COSNull, org.apache.pdfbox.cos.COSNumber, org.apache.pdfbox.cos.COSObject, org.apache.pdfbox.cos.COSString, org.apache.pdfbox.cos.COSArray
Imports
org.apache.pdfbox.pdmodel.common.COSObjectable, java.io.IOException

The base object that all objects in the PDF document will extend.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private boolean
private COSObjectKey

Constructor Summary

AccessConstructor and Description
public
COSBase()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract void
accept(ICOSVisitor
The object to notify when visiting this object.
visitor
)

visitor pattern double dispatch method.

public COSBase

Returns:

The cos object that matches this Java object.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public COSObjectKey

Returns:

the COSObjectKey
getKey
()

This will return the COSObjectKey of an indirect object.

public boolean

Returns:

the state
isDirect
()

If the state is set true, the dictionary will be written direct into the called object.

public void
setDirect(boolean
set it true, for writing direct object
direct
)

Set the state true, if the dictionary should be written as a direct object and not indirect.

public void
setKey(COSObjectKey
the COSObjectKey of the indirect object
key
)

Set the COSObjectKey of an indirect object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

directback to summary
private boolean direct
keyback to summary
private COSObjectKey key

Constructor Detail

COSBaseback to summary
public COSBase()

Constructor.

Method Detail

acceptback to summary
public abstract void accept(ICOSVisitor visitor) throws IOException

visitor pattern double dispatch method.

Parameters
visitor:ICOSVisitor

The object to notify when visiting this object.

Exceptions
IOException:
If an error occurs while visiting this object.
getCOSObjectback to summary
public COSBase getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSBase

The cos object that matches this Java object.

Annotations
@Override
getKeyback to summary
public COSObjectKey getKey()

This will return the COSObjectKey of an indirect object.

Returns:COSObjectKey

the COSObjectKey

isDirectback to summary
public boolean isDirect()

If the state is set true, the dictionary will be written direct into the called object. This means, no indirect object will be created.

Returns:boolean

the state

setDirectback to summary
public void setDirect(boolean direct)

Set the state true, if the dictionary should be written as a direct object and not indirect.

Parameters
direct:boolean

set it true, for writing direct object

setKeyback to summary
public void setKey(COSObjectKey key)

Set the COSObjectKey of an indirect object.

Parameters
key:COSObjectKey

the COSObjectKey of the indirect object