aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/io/CharToByteCp937.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/io/CharToByteCp937.java')
-rw-r--r--src/share/classes/sun/io/CharToByteCp937.java41
1 files changed, 9 insertions, 32 deletions
diff --git a/src/share/classes/sun/io/CharToByteCp937.java b/src/share/classes/sun/io/CharToByteCp937.java
index d872163ae..acdd782bb 100644
--- a/src/share/classes/sun/io/CharToByteCp937.java
+++ b/src/share/classes/sun/io/CharToByteCp937.java
@@ -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
+public class CharToByteCp937 extends CharToByteDBCS_EBCDIC {
-{
+ // Return the character set id
+ public String getCharacterEncoding() {
+ return "Cp937";
+ }
- // Return the character set id
- public String getCharacterEncoding()
- {
- return "Cp937";
- }
-
- private short index1[];
- private String index2;
- private String index2a;
- private static final IBM937 nioCoder = new IBM937();
-
- 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());
+ }
}