|
jPod PDF library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.encoding.Encoding
de.intarsys.pdf.encoding.MappedEncoding
public class MappedEncoding
A MappedEncoding is an explicit map from a codepoint to a character.
A MappedEncoding can be constructed individually (as in a DifferenceEncoding) or be one of the predefined well known encodings that are implemented using unique instances.
Field Summary |
---|
Constructor Summary | |
---|---|
MappedEncoding()
|
Method Summary | |
---|---|
void |
addEncoding(int codePoint,
String name)
When constructing manually, one can define a map from codePoint to name with this method. |
void |
addEncoding(int codePoint,
String name,
int character)
Add a known complete tuple. |
COSObject |
cosGetObject()
Get an object that can be used as a representation of the receiver encoding within doc . |
int |
getDecoded(int byteValue)
Get the character for the codepoint or -1 if not available. |
int |
getEncoded(int character)
Get the codepoint for the the character or -1 if invalid. |
int |
getEncoded(String name)
Get the codepoint for the the named character or -1 if invalid. |
String |
getGlyphName(int codePoint)
Get the character name for a given encoded codepoint. |
String |
getName()
The name of this encoding. |
Methods inherited from class de.intarsys.pdf.encoding.Encoding |
---|
createNamed, createReader, createWriter, decode, decode, decode, encode, encode, encode, encode, getDifferenceDecoded, getDifferenceGlyphName, getNextDecoded, getNextEncoded, getValidEncoded, getValidEncoded, isEncodable, isEncodable, isEncodable, isFontSpecificEncoding, putNextDecoded, putNextEncoded, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MappedEncoding()
Method Detail |
---|
public void addEncoding(int codePoint, String name)
codePoint
to name
with this method.
codePoint
- The codePoint from 0..255 where the character should be
mapped.name
- The name of the character to be mapped.public void addEncoding(int codePoint, String name, int character)
codePoint
- The codePoint from 0..255 where the character should be
mapped.name
- The name of the character to be mapped.character
- The character valuepublic COSObject cosGetObject()
Encoding
doc
.
cosGetObject
in class Encoding
doc
.public int getDecoded(int byteValue)
Encoding
getDecoded
in class Encoding
byteValue
- The codepoint
public int getEncoded(int character)
Encoding
getEncoded
in class Encoding
character
- The character to look up.
public int getEncoded(String name)
Encoding
getEncoded
in class Encoding
name
- The character name to look up.
public String getGlyphName(int codePoint)
Encoding
getGlyphName
in class Encoding
codePoint
- The encoded codepoint.
codepoint
or ".notdef".public String getName()
Encoding
getName
in class Encoding
|
jPod PDF library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |