Package com.itextpdf.io.font.cmap
Class CMapObject
java.lang.Object
com.itextpdf.io.font.cmap.CMapObject
Represents a typed object parsed from CMap content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetType()Returns this object's type code.getValue()Returns the value represented by this object.booleanisArray()Tests whether this object is an array.booleanTests whether this object is a dictionary.booleanTests whether this object is a hexadecimal string.booleanTests whether this object is a command literal.booleanisName()Tests whether this object is a PDF name.booleanisNumber()Tests whether this object is a number.booleanisString()Tests whether this object is a literal or hexadecimal string.booleanisToken()Tests whether this object is a structural token.voidReplaces this object's stored value.byte[]Returns the byte array of a hexadecimal string object.toString()Return String representation ofvaluefield.
-
Field Details
-
STRING
protected static final int STRING- See Also:
-
HEX_STRING
protected static final int HEX_STRING- See Also:
-
NAME
protected static final int NAME- See Also:
-
NUMBER
protected static final int NUMBER- See Also:
-
LITERAL
protected static final int LITERAL- See Also:
-
ARRAY
protected static final int ARRAY- See Also:
-
DICTIONARY
protected static final int DICTIONARY- See Also:
-
TOKEN
protected static final int TOKEN- See Also:
-
-
Constructor Details
-
CMapObject
Creates a typed CMap object.- Parameters:
-
objectType- one of this class's object-type constants -
value- the value associated with the type
-
-
Method Details
-
getValue
Returns the value represented by this object.- Returns:
- the stored value
-
getType
public int getType()Returns this object's type code.- Returns:
- one of this class's object type constants
-
setValue
Replaces this object's stored value.- Parameters:
-
value- the new value
-
isString
public boolean isString()Tests whether this object is a literal or hexadecimal string.- Returns:
-
truefor either string type
-
isHexString
public boolean isHexString()Tests whether this object is a hexadecimal string.- Returns:
-
truewhen this object's type is hexadecimal string
-
isName
public boolean isName()Tests whether this object is a PDF name.- Returns:
-
truewhen this object's type is name
-
isNumber
public boolean isNumber()Tests whether this object is a number.- Returns:
-
truewhen this object's type is number
-
isLiteral
public boolean isLiteral()Tests whether this object is a command literal.- Returns:
-
truewhen this object's type is literal
-
isArray
public boolean isArray()Tests whether this object is an array.- Returns:
-
truewhen this object's type is array
-
isDictionary
public boolean isDictionary()Tests whether this object is a dictionary.- Returns:
-
truewhen this object's type is dictionary
-
isToken
public boolean isToken()Tests whether this object is a structural token.- Returns:
-
truewhen this object's type is token
-
toString
Return String representation ofvaluefield. -
toHexByteArray
public byte[] toHexByteArray()Returns the byte array of a hexadecimal string object.- Returns:
-
the retained byte array, or
nullwhen this is not a hexadecimal string
-