public class ISO8859_1 extends java.lang.Object implements CodeCharset
Charset
etc. may be over engineered,
An important feature: report non-map-able characters, is missing.
The conversion between the ISO-8859-1 code page and UTF16 is very simple because it is the low part
of UTF-16. All other code pages needs three tables with binary search for encoding, see ISO8859_2
etc.Modifier and Type | Field and Description |
---|---|
(package private) java.nio.charset.Charset |
charset |
ascii, charsets, iso8859_1
Constructor and Description |
---|
ISO8859_1() |
Modifier and Type | Method and Description |
---|---|
char |
getChar(int code)
Converts from a 8-bit-code to a character
|
java.nio.charset.Charset |
getCharset() |
int |
getCode(char cc)
Converts from a UTC-16(Java-Character to a 8 bit coding.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forName
public int getCode(char cc)
CodeCharset
getCode
in interface CodeCharset
cc
- the characterpublic char getChar(int code)
CodeCharset
getChar
in interface CodeCharset
code
- in range 0..255, maybe >= 256 for UTF-8 sequences (The lowest byte is the first byte),
with max. 4 Byte (for not all UTF characters)public java.nio.charset.Charset getCharset()
getCharset
in interface CodeCharset