Class IdentityCMap


  • public class IdentityCMap
    extends CMap
    Class represents identity CMap.
    Author:
    Sergey Shemyakov
    • Constructor Detail

      • IdentityCMap

        public IdentityCMap​(String name)
    • Method Detail

      • toCID

        public int toCID​(int character)
        Description copied from class: CMap
        Gets CID for given character.
        Overrides:
        toCID in class CMap
        Parameters:
        character - is code of character, for which CID is calculated.
        Returns:
        CID for given character or 0 if it cannot be obtained.
      • containsCode

        public boolean containsCode​(int character)
        Overrides:
        containsCode in class CMap
        Returns:
        true if this CMap can convert given code to CID.
      • getCodeFromStream

        public int getCodeFromStream​(InputStream stream)
                              throws IOException
        Description copied from class: CMap
        Reads character code from input stream and returnes it's CID. This uses codespace information from CMap. Details are described in PDF32000 in 9.7.6.2 "CMap Mapping".
        Overrides:
        getCodeFromStream in class CMap
        Parameters:
        stream - is stream from which character codes will be read.
        Returns:
        CID of read code.
        Throws:
        IOException
      • getRegistry

        public String getRegistry()
        Overrides:
        getRegistry in class CMap
        Returns:
        Registry value from CIDSystemInfo dictionary.
      • getOrdering

        public String getOrdering()
        Overrides:
        getOrdering in class CMap
        Returns:
        Ordering value from CIDSystemInfo dictionary.
      • getSupplement

        public int getSupplement()
        Overrides:
        getSupplement in class CMap
        Returns:
        supplement of CMap.
      • getUnicode

        public String getUnicode​(int code)
        Description copied from class: CMap
        Returns Unicode sequence for given character code.
        Overrides:
        getUnicode in class CMap
        Parameters:
        code - is code of character.
        Returns:
        Unicode sequence obtained from this CMap.