src/share/classes/sun/io/ByteToCharCp943C.java

Print this page

        

*** 23,68 **** * have any questions. */ package sun.io; ! import sun.io.*; 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; ! ! /* 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; } } --- 23,40 ---- * have any questions. */ package sun.io; ! import sun.nio.cs.ext.*; public class ByteToCharCp943C extends ByteToCharDBCS_ASCII { ! // Return the character set id public String getCharacterEncoding() { return "Cp943C"; } ! public ByteToCharCp943C() { ! super((DoubleByte.Decoder)new IBM943C().newDecoder()); } }