org.apache.fontbox.cmap
public class CMap extends Object
Version: $Revision: 1.3 $
| Constructor Summary | |
|---|---|
| CMap()
Creates a new instance of CMap. | |
| Method Summary | |
|---|---|
| void | addCodespaceRange(CodespaceRange range)
This will add a codespace range.
|
| void | addMapping(byte[] src, String dest)
This will add a mapping.
|
| List | getCodeSpaceRanges()
Getter for property codeSpaceRanges.
|
| boolean | hasOneByteMappings()
This will tell if this cmap has any one byte mappings.
|
| boolean | hasTwoByteMappings()
This will tell if this cmap has any two byte mappings.
|
| boolean | isInCodeSpaceRanges(byte[] code)
Check whether the given byte array is in codespace ranges or not.
|
| boolean | isInCodeSpaceRanges(byte[] code, int offset, int length)
Check whether the given byte array is in codespace ranges or not.
|
| String | lookup(byte[] code, int offset, int length)
This will perform a lookup into the map.
|
| void | useCmap(CMap cmap)
Implementation of the usecmap operator. |
Parameters: range A single codespace range.
Parameters: src The src to the mapping. dest The dest to the mapping.
Throws: IOException if the src is invalid.
Returns: Value of property codeSpaceRanges.
Returns: true If there are any one byte mappings, false otherwise.
Returns: true If there are any two byte mappings, false otherwise.
Parameters: code The byte array to look for in the codespace range.
Returns: true if the given byte array is in the codespace range.
Parameters: code The byte array to look for in the codespace range. offset The starting offset within the byte array. length The length of the part of the array.
Returns: true if the given byte array is in the codespace range.
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.
Parameters: cmap The cmap to load mappings from.