Package com.tom_roush.pdfbox.cos
Class COSBase
- java.lang.Object
-
- com.tom_roush.pdfbox.cos.COSBase
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
COSArray,COSBoolean,COSDictionary,COSDocument,COSName,COSNull,COSNumber,COSObject,COSString
public abstract class COSBase extends Object implements COSObjectable
The base object that all objects in the PDF document will extend.
-
-
Constructor Summary
Constructors Constructor Description COSBase()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectaccept(ICOSVisitor visitor)visitor pattern double dispatch method.COSBasegetCOSObject()Convert this standard java object to a COS object.booleanisDirect()If the state is set true, the dictionary will be written direct into the called object.voidsetDirect(boolean direct)Set the state true, if the dictionary should be written as a direct object and not indirect.
-
-
-
Method Detail
-
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The cos object that matches this Java object.
-
accept
public abstract Object accept(ICOSVisitor visitor) throws IOException
visitor pattern double dispatch method.- Parameters:
visitor- The object to notify when visiting this object.- Returns:
- any object, depending on the visitor implementation, or null
- Throws:
IOException- If an error occurs while visiting this object.
-
isDirect
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:
- the state
-
setDirect
public void setDirect(boolean direct)
Set the state true, if the dictionary should be written as a direct object and not indirect.- Parameters:
direct- set it true, for writting direct object
-
-