public abstract class CosObject extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DIRECT |
static int |
INDIRECT |
static int |
t_Array |
static int |
t_Boolean |
static int |
t_Dictionary |
static int |
t_KeyAbsent |
static int |
t_Name |
static int |
t_Null |
static int |
t_Numeric |
static int |
t_ObjectRef |
static int |
t_Stream |
static int |
t_String |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Returns boolean value if it's type of
CosBoolean else throws exception. |
double |
doubleValue()
Returns double value if it's type of
CosNumeric else throws exception. |
abstract boolean |
equals(CosObject value)
This method returns true if either they have same reference or have same
data inside.
|
boolean |
equals(Object value)
Object.equals(Object) is overridden here.
|
CosDocument |
getDocument()
Obtain the COS document that contains this object.
|
long |
getObjEOF()
Return EOF of object's update section or zero if cannot be determined.
|
int |
getObjGen()
Indirect object generation or -1 if direct
|
int |
getObjNum()
Indirect object number or zero if direct
|
long |
getObjPos()
Return object's position or zero if cannot be determined.
|
int |
getObjRevision()
Return index of object's update section or -1 if cannot be determined.
|
StreamManager |
getStreamManager()
Obtain the StreamManager for the document containing this object.
|
abstract int |
getType()
return which of the concrete subtypes of CosObject we are
|
abstract Object |
getValue() |
ASHexString |
hexStringValue()
Returns hex string value if it's type of
CosString else throws exception. |
int |
intValue()
Accessor functions for scalar CosObjects.
|
boolean |
isCompressed()
Returns true if this INDIRECT object currently resides in an object stream.
|
boolean |
isDirty()
Returns if this cosobject is dirty, else false.
|
boolean |
isIndirect() |
long |
longValue()
Returns long value if it's type of
CosNumeric else throws exception. |
ASName |
nameValue()
Returns name value if it's type of
CosName else throws exception. |
Number |
numberValue()
Returns number value if it's type of
CosNumeric else throws exception. |
ASString |
stringValue()
Returns string value if it's type of
CosString else throws exception. |
String |
textValue()
Returns text value if it's type of
CosString else throws exception. |
String |
toString() |
public static final int t_Null
public static final int t_Numeric
public static final int t_Boolean
public static final int t_Name
public static final int t_String
public static final int t_Array
public static final int t_Dictionary
public static final int t_Stream
public static final int t_ObjectRef
public static final int t_KeyAbsent
public static final int DIRECT
public static final int INDIRECT
public abstract int getType()
public abstract Object getValue() throws PDFCosParseException, PDFIOException, PDFSecurityException
PDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic boolean isIndirect()
public int getObjNum()
public int getObjGen()
public long getObjEOF()
public int getObjRevision()
public long getObjPos()
public boolean isCompressed()
public int intValue()
public long longValue()
CosNumeric else throws exception.public double doubleValue()
CosNumeric else throws exception.public Number numberValue()
CosNumeric else throws exception.public boolean booleanValue()
CosBoolean else throws exception.public ASName nameValue()
CosName else throws exception.public ASString stringValue() throws PDFSecurityException
CosString else throws exception.PDFSecurityExceptionpublic ASHexString hexStringValue() throws PDFSecurityException
CosString else throws exception.PDFSecurityExceptionpublic String textValue() throws PDFSecurityException
CosString else throws exception.PDFSecurityExceptionpublic CosDocument getDocument()
public StreamManager getStreamManager()
public boolean isDirty()
public abstract boolean equals(CosObject value)
value - Copyright © 2010 - 2020 Adobe. All Rights Reserved