--- a/jdk/src/share/classes/sun/io/CharToByteCp942.java Wed May 20 13:55:50 2009 -0700
+++ b/jdk/src/share/classes/sun/io/CharToByteCp942.java Thu May 21 23:32:46 2009 -0700
@@ -24,33 +24,16 @@
*/
package sun.io;
-import sun.nio.cs.ext.IBM942;
+import sun.nio.cs.ext.*;
-/**
-* Tables and data to convert Unicode to Cp942
-*
-* @author Malcolm Ayres, assisted by UniMap program
-*/
-public class CharToByteCp942
- extends CharToByteDBCS_ASCII
-
-{
- private static IBM942 nioCoder = new IBM942();
+public class CharToByteCp942 extends CharToByteDBCS_ASCII {
- // Return the character set id
- public String getCharacterEncoding()
- {
- return "Cp942";
- }
+ // Return the character set id
+ public String getCharacterEncoding() {
+ return "Cp942";
+ }
- public CharToByteCp942()
- {
- super();
- super.mask1 = 0xFFE0;
- super.mask2 = 0x001F;
- super.shift = 5;
- super.index1 = nioCoder.getEncoderIndex1();
- super.index2 = nioCoder.getEncoderIndex2();
- super.index2a = nioCoder.getEncoderIndex2a();
- }
+ public CharToByteCp942() {
+ super((DoubleByte.Encoder)new IBM942().newEncoder());
+ }
}