public abstract class Encoding extends Object implements COSObjectable
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,String> |
codeToName |
protected Map<String,Integer> |
inverted |
Constructor and Description |
---|
Encoding() |
Modifier and Type | Method and Description |
---|---|
protected void |
add(int code,
String name)
This will add a character encoding.
|
boolean |
contains(int code)
Determines if the encoding has a mapping for the given code value.
|
boolean |
contains(String name)
Determines if the encoding has a mapping for the given name value.
|
Map<Integer,String> |
getCodeToNameMap()
Returns an unmodifiable view of the code -> name mapping.
|
abstract String |
getEncodingName()
Returns the name of this encoding.
|
static Encoding |
getInstance(COSName name)
This will get an encoding by name.
|
String |
getName(int code)
This will take a character code and get the name from the code.
|
Map<String,Integer> |
getNameToCodeMap()
Returns an unmodifiable view of the name -> code mapping.
|
protected void |
overwrite(int code,
String name)
This will add a character encoding.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCOSObject
public static Encoding getInstance(COSName name)
name
- The name of the encoding to get.public Map<Integer,String> getCodeToNameMap()
public Map<String,Integer> getNameToCodeMap()
protected void add(int code, String name)
code
- character codename
- PostScript glyph nameoverwrite(int, String)
protected void overwrite(int code, String name)
code
- character codename
- PostScript glyph nameadd(int, String)
public boolean contains(String name)
name
- PostScript glyph namepublic boolean contains(int code)
code
- character codepublic String getName(int code)
code
- character codepublic abstract String getEncodingName()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.