Class CMapToUnicode
java.lang.Object
com.itextpdf.text.pdf.fonts.cmaps.AbstractCMap
com.itextpdf.text.pdf.fonts.cmaps.CMapToUnicode
This class represents a CMap file.
- Since:
- 2.1.4
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
private int
private String
createStringFromBytes
(byte[] bytes) static CMapToUnicode
boolean
This will tell if this cmap has any one byte mappings.boolean
This will tell if this cmap has any two byte mappings.lookup
(byte[] code, int offset, int length) This will perform a lookup into the map.Methods inherited from class com.itextpdf.text.pdf.fonts.cmaps.AbstractCMap
addRange, decodeStringToByte, decodeStringToUnicode, getName, getOrdering, getRegistry, getSupplement, setName, setOrdering, setRegistry, setSupplement
-
Field Details
-
singleByteMappings
-
doubleByteMappings
-
-
Constructor Details
-
CMapToUnicode
public CMapToUnicode()Creates a new instance of CMap.
-
-
Method Details
-
hasOneByteMappings
public boolean hasOneByteMappings()This will tell if this cmap has any one byte mappings.- Returns:
- true If there are any one byte mappings, false otherwise.
-
hasTwoByteMappings
public boolean hasTwoByteMappings()This will tell if this cmap has any two byte mappings.- Returns:
- true If there are any two byte mappings, false otherwise.
-
lookup
This will perform a lookup into the map.- Parameters:
code
- The code used to lookup.offset
- The offset into the byte array.length
- The length of the data we are getting.- Returns:
- The string that matches the lookup.
-
createReverseMapping
- Throws:
IOException
-
createDirectMapping
- Throws:
IOException
-
convertToInt
- Throws:
IOException
-
addChar
-
addChar
- Specified by:
addChar
in classAbstractCMap
-
createStringFromBytes
- Throws:
IOException
-
getIdentity
-