--- old/src/share/classes/sun/io/CharToByteCp948.java Wed May 20 18:59:19 2009 +++ new/src/share/classes/sun/io/CharToByteCp948.java Wed May 20 18:59:18 2009 @@ -22,36 +22,19 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package sun.io; -import sun.nio.cs.ext.IBM948; +import sun.nio.cs.ext.*; -/** -* Tables and data to convert Unicode to Cp948 -* -* @author Malcolm Ayres, assisted by UniMap program -*/ -public class CharToByteCp948 - extends CharToByteDBCS_ASCII +public class CharToByteCp948 extends CharToByteDBCS_ASCII { -{ - private static IBM948 nioCoder = new IBM948(); + // Return the character set id + public String getCharacterEncoding() { + return "Cp948"; + } - // Return the character set id - public String getCharacterEncoding() - { - return "Cp948"; - } - - - public CharToByteCp948() - { - super(); - super.mask1 = 0xFFC0; - super.mask2 = 0x003F; - super.shift = 6; - super.index1 = nioCoder.getEncoderIndex1(); - super.index2 = nioCoder.getEncoderIndex2(); - super.index2a = nioCoder.getEncoderIndex2a(); - } + public CharToByteCp948() { + super((DoubleByte.Encoder)new IBM948().newEncoder()); + } }