BuiltInEncoding
, CFFEncoding
, MacRomanEncoding
, StandardEncoding
public abstract class Encoding extends Object
Modifier and Type | Field | Description |
---|---|---|
protected Map<Integer,String> |
codeToName |
This is a mapping from a character code to a character name.
|
protected Map<String,Integer> |
nameToCode |
This is a mapping from a character name to a character code.
|
Constructor | Description |
---|---|
Encoding() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCharacterEncoding(int code,
String name) |
This will add a character encoding.
|
Integer |
getCode(String name) |
This will get the character code for the name.
|
Map<Integer,String> |
getCodeToNameMap() |
Returns an unmodifiable view of the code to name mapping.
|
String |
getName(int code) |
This will take a character code and get the name from the code.
|
protected Map<Integer,String> codeToName
protected void addCharacterEncoding(int code, String name)
code
- The character code that matches the character.name
- The name of the character.public Integer getCode(String name)
name
- The name of the character.public String getName(int code)
code
- The character code.Copyright © 2008–2018. All rights reserved.