aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/io/CharToByteCp942.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/io/CharToByteCp942.java')
-rw-r--r--src/share/classes/sun/io/CharToByteCp942.java35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/share/classes/sun/io/CharToByteCp942.java b/src/share/classes/sun/io/CharToByteCp942.java
index 1d5224d9f..21b9a7677 100644
--- a/src/share/classes/sun/io/CharToByteCp942.java
+++ b/src/share/classes/sun/io/CharToByteCp942.java
@@ -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
+public class CharToByteCp942 extends CharToByteDBCS_ASCII {
-{
- private static IBM942 nioCoder = new IBM942();
+ // 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());
+ }
}