diff options
Diffstat (limited to 'src/share/classes/sun/io/ByteToCharCp943C.java')
-rw-r--r-- | src/share/classes/sun/io/ByteToCharCp943C.java | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/src/share/classes/sun/io/ByteToCharCp943C.java b/src/share/classes/sun/io/ByteToCharCp943C.java index 1d7b58652..225963840 100644 --- a/src/share/classes/sun/io/ByteToCharCp943C.java +++ b/src/share/classes/sun/io/ByteToCharCp943C.java @@ -25,44 +25,16 @@ package sun.io; -import sun.io.*; +import sun.nio.cs.ext.*; public class ByteToCharCp943C extends ByteToCharDBCS_ASCII { - protected static final String singleByteToChar; - protected static final boolean leadByte[]; - protected static final short index1[]; - protected static final String index2; - protected static final int mask1; - protected static final int mask2; - protected static final int shift; - static { - ByteToCharDBCS_ASCII y = new ByteToCharCp943(); - mask1 = y.mask1; - mask2 = y.mask2; - shift = y.shift; - leadByte = y.leadByte; - index1 = y.index1; - index2 = y.index2; + // Return the character set id + public String getCharacterEncoding() { + return "Cp943C"; + } - /* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */ - String indexs = ""; - for (char c = '\0'; c < '\u0080'; ++c) indexs += c; - singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length()); - } - - public String getCharacterEncoding() { - return "Cp943C"; - } - - ByteToCharCp943C() { - super(); - super.mask1 = mask1; - super.mask2 = mask2; - super.shift = shift; - super.leadByte = leadByte; - super.singleByteToChar = singleByteToChar; - super.index1 = index1; - super.index2 = index2; - } + public ByteToCharCp943C() { + super((DoubleByte.Decoder)new IBM943C().newDecoder()); + } } |