public class CMap
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.List |
codeSpaceRanges |
private java.util.Map |
doubleByteMappings |
private java.util.Map |
singleByteMappings |
| Constructor and Description |
|---|
CMap()
Creates a new instance of CMap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCodespaceRange(CodespaceRange range)
This will add a codespace range.
|
void |
addMapping(byte[] src,
java.lang.String dest)
This will add a mapping.
|
java.util.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.
|
java.lang.String |
lookup(byte[] code,
int offset,
int length)
This will perform a lookup into the map.
|
private java.util.List codeSpaceRanges
private java.util.Map singleByteMappings
private java.util.Map doubleByteMappings
public boolean hasOneByteMappings()
public boolean hasTwoByteMappings()
public java.lang.String lookup(byte[] code,
int offset,
int length)
code - The code used to lookup.offset - The offset into the byte array.length - The length of the data we are getting.public void addMapping(byte[] src,
java.lang.String dest)
throws java.io.IOException
src - The src to the mapping.dest - The dest to the mapping.java.io.IOException - if the src is invalid.public void addCodespaceRange(CodespaceRange range)
range - A single codespace range.public java.util.List getCodeSpaceRanges()