Package org.verapdf.pd.font.cmap
Class IdentityCMap
- java.lang.Object
-
- org.verapdf.pd.font.cmap.CMap
-
- org.verapdf.pd.font.cmap.IdentityCMap
-
public class IdentityCMap extends CMap
Class represents identity CMap.- Author:
- Sergey Shemyakov
-
-
Constructor Summary
Constructors Constructor Description IdentityCMap(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsCode(int character)
int
getCodeFromStream(InputStream stream)
Reads character code from input stream and returnes it's CID.String
getOrdering()
String
getRegistry()
int
getSupplement()
String
getUnicode(int code)
Returns Unicode sequence for given character code.int
toCID(int character)
Gets CID for given character.-
Methods inherited from class org.verapdf.pd.font.cmap.CMap
getCidMappings, getName, getwMode, isUsesNonPredefinedCMap, setSupplement, setUsesNonPredefinedCMap, useCMap
-
-
-
-
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.
-
containsCode
public boolean containsCode(int character)
- Overrides:
containsCode
in classCMap
- 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 classCMap
- 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 classCMap
- Returns:
- Registry value from CIDSystemInfo dictionary.
-
getOrdering
public String getOrdering()
- Overrides:
getOrdering
in classCMap
- Returns:
- Ordering value from CIDSystemInfo dictionary.
-
getSupplement
public int getSupplement()
- Overrides:
getSupplement
in classCMap
- 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 classCMap
- Parameters:
code
- is code of character.- Returns:
- Unicode sequence obtained from this CMap.
-
-