public class SimpleSingleByteEncoding extends Object implements SingleByteEncoding
NOT_FOUND_CODE_POINT| Constructor and Description |
|---|
SimpleSingleByteEncoding(String name)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
char |
addCharacter(NamedCharacter ch)
Adds a new character to the encoding.
|
NamedCharacter |
getCharacterForIndex(int codePoint)
Returns the named character at a given code point in the encoding.
|
String[] |
getCharNameMap()
Returns the array of character names for this encoding.
|
int |
getFirstChar()
Returns the index of the first defined character.
|
int |
getLastChar()
Returns the index of the last defined character.
|
String |
getName()
Returns the encoding's name.
|
int |
getSize()
Returns the number of characters defined by this encoding.
|
char[] |
getUnicodeCharMap()
Returns a character array with Unicode scalar values which can be used to map encoding
code points to Unicode values.
|
boolean |
isFull()
Indicates whether the encoding is full (with 256 code points).
|
char |
mapChar(char c)
Maps a Unicode character to a code point in the encoding.
|
String |
toString() |
public SimpleSingleByteEncoding(String name)
name - the encoding's namepublic String getName()
getName in interface SingleByteEncodingpublic char mapChar(char c)
mapChar in interface SingleByteEncodingc - the Unicode character to mappublic String[] getCharNameMap()
getCharNameMap in interface SingleByteEncodingpublic int getFirstChar()
public int getLastChar()
public int getSize()
public boolean isFull()
public char addCharacter(NamedCharacter ch)
ch - the named characterpublic NamedCharacter getCharacterForIndex(int codePoint)
codePoint - the code point of the characterpublic char[] getUnicodeCharMap()
getUnicodeCharMap in interface SingleByteEncodingCopyright © 2025 Apache Software Foundation. All rights reserved.