public class BCDCharCodec extends Object implements CharCodec
Constructor and Description |
---|
BCDCharCodec(String digitMapping)
Constructs a 3GPP standards-based digit codec
customised to the given digit mapping.
|
Modifier and Type | Method and Description |
---|---|
char |
decodeChar(int digit)
Gets the decoded character from an encoded value.
|
int |
encodeChar(char ch)
Gets the encoded value for a character.
|
public BCDCharCodec(String digitMapping)
digitMapping
- String showing how the 16 BCD digits are decoded to address characterspublic int encodeChar(char ch)
CharCodec
encodeChar
in interface CharCodec
ch
- the character to encodepublic char decodeChar(int digit)
CharCodec
decodeChar
in interface CharCodec
digit
- the encoded form of the character.