Class CMapObject

java.lang.Object
com.itextpdf.io.font.cmap.CMapObject

public class CMapObject extends Object
Represents a typed object parsed from CMap content.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CMapObject(int objectType, Object value)
    Creates a typed CMap object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns this object's type code.
    Returns the value represented by this object.
    boolean
    Tests whether this object is an array.
    boolean
    Tests whether this object is a dictionary.
    boolean
    Tests whether this object is a hexadecimal string.
    boolean
    Tests whether this object is a command literal.
    boolean
    isName()
    Tests whether this object is a PDF name.
    boolean
    Tests whether this object is a number.
    boolean
    Tests whether this object is a literal or hexadecimal string.
    boolean
    Tests whether this object is a structural token.
    void
    setValue(Object value)
    Replaces this object's stored value.
    byte[]
    Returns the byte array of a hexadecimal string object.
    Return String representation of value field.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CMapObject

      public CMapObject (int objectType, Object value)
      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

      public Object 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

      public void setValue (Object value)
      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:
      true for either string type
    • isHexString

      public boolean isHexString()
      Tests whether this object is a hexadecimal string.
      Returns:
      true when this object's type is hexadecimal string
    • isName

      public boolean isName()
      Tests whether this object is a PDF name.
      Returns:
      true when this object's type is name
    • isNumber

      public boolean isNumber()
      Tests whether this object is a number.
      Returns:
      true when this object's type is number
    • isLiteral

      public boolean isLiteral()
      Tests whether this object is a command literal.
      Returns:
      true when this object's type is literal
    • isArray

      public boolean isArray()
      Tests whether this object is an array.
      Returns:
      true when this object's type is array
    • isDictionary

      public boolean isDictionary()
      Tests whether this object is a dictionary.
      Returns:
      true when this object's type is dictionary
    • isToken

      public boolean isToken()
      Tests whether this object is a structural token.
      Returns:
      true when this object's type is token
    • toString

      public String toString()
      Return String representation of value field.
      Overrides:
      toString in class Object
    • toHexByteArray

      public byte[] toHexByteArray()
      Returns the byte array of a hexadecimal string object.
      Returns:
      the retained byte array, or null when this is not a hexadecimal string