--- a/jdk/src/share/classes/sun/io/CharToByteCp937.java Wed May 20 13:55:50 2009 -0700
+++ b/jdk/src/share/classes/sun/io/CharToByteCp937.java Thu May 21 23:32:46 2009 -0700
@@ -24,39 +24,16 @@
*/
package sun.io;
-import sun.nio.cs.ext.IBM937;
+import sun.nio.cs.ext.*;
-/**
-* Tables and data to convert Unicode to Cp937
-*
-* @author Malcolm Ayres, assisted by UniMap program
-*/
-public class CharToByteCp937
- extends CharToByteDBCS_EBCDIC
-
-{
-
- // Return the character set id
- public String getCharacterEncoding()
- {
- return "Cp937";
- }
+public class CharToByteCp937 extends CharToByteDBCS_EBCDIC {
- private short index1[];
- private String index2;
- private String index2a;
- private static final IBM937 nioCoder = new IBM937();
+ // Return the character set id
+ public String getCharacterEncoding() {
+ return "Cp937";
+ }
- public CharToByteCp937()
- {
- 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;
- }
+ public CharToByteCp937() {
+ super((DoubleByte.Encoder)new IBM937().newEncoder());
+ }
}