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

Print this page

        

@@ -20,36 +20,21 @@
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
-// Table from Unicode to Cp943
+
 package sun.io;
 
-import sun.nio.cs.ext.IBM943;
+import sun.nio.cs.ext.*;
 
-/**
- * Tables and data to convert Unicode to Cp943
- *
- * @author  BuildTables tool
- */
-
 public class CharToByteCp943 extends CharToByteDBCS_ASCII {
 
-    private static IBM943 nioCoder = new IBM943();
-
+    // Return the character set id
     public String getCharacterEncoding() {
         return "Cp943";
     }
 
     public CharToByteCp943() {
-        super();
-        super.mask1 = 0xFFC0;
-        super.mask2 = 0x003F;
-        super.shift = 6;
-        super.index1 = nioCoder.getEncoderIndex1();
-        super.index2 = nioCoder.getEncoderIndex2();
-        super.index2a = nioCoder.getEncoderIndex2a();
-        subBytes = new byte[1];
-        subBytes[0] = 0x6f;
+        super((DoubleByte.Encoder)new IBM943().newEncoder());
     }
 }