aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/io/CharToByteCp939.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/io/CharToByteCp939.java')
-rw-r--r--src/share/classes/sun/io/CharToByteCp939.java38
1 files changed, 9 insertions, 29 deletions
diff --git a/src/share/classes/sun/io/CharToByteCp939.java b/src/share/classes/sun/io/CharToByteCp939.java
index 00929d1bf..4a5814a7c 100644
--- a/src/share/classes/sun/io/CharToByteCp939.java
+++ b/src/share/classes/sun/io/CharToByteCp939.java
@@ -24,36 +24,16 @@
*/
package sun.io;
-import sun.nio.cs.ext.IBM939;
+import sun.nio.cs.ext.*;
-/**
-* Tables and data to convert Unicode to Cp939
-*
-* @author Malcolm Ayres, assisted by UniMap program
-*/
-public class CharToByteCp939
- extends CharToByteDBCS_EBCDIC
+public class CharToByteCp939 extends CharToByteDBCS_EBCDIC {
-{
+ // Return the character set id
+ public String getCharacterEncoding() {
+ return "Cp939";
+ }
- private final static IBM939 nioCoder = new IBM939();
-
- // Return the character set id
- public String getCharacterEncoding()
- {
- return "Cp939";
- }
-
- public CharToByteCp939()
- {
- super();
- super.mask1 = 0xFFE0;
- super.mask2 = 0x001F;
- super.shift = 5;
- super.index1 = nioCoder.getEncoderIndex1();
- super.index2 = nioCoder.getEncoderIndex2();
- super.index2a = nioCoder.getEncoderIndex2a();
- subBytes = new byte[1];
- subBytes[0] = 0x6f;
- }
+ public CharToByteCp939() {
+ super((DoubleByte.Encoder)new IBM939().newEncoder());
+ }
}