--- old/src/share/classes/sun/nio/cs/ext/MS50220.java 2012-07-19 09:42:33.000000000 -0700 +++ new/src/share/classes/sun/nio/cs/ext/MS50220.java 2012-07-19 09:42:33.000000000 -0700 @@ -26,6 +26,8 @@ package sun.nio.cs.ext; import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; public class MS50220 extends ISO2022_JP { @@ -34,6 +36,10 @@ ExtendedCharsets.aliasesFor("x-windows-50220")); } + protected MS50220(String canonicalName, String[] aliases) { + super(canonicalName, aliases); + } + public String historicalName() { return "MS50220"; } @@ -44,29 +50,25 @@ (cs instanceof MS50220); } - protected short[] getDecIndex1() { - return JIS_X_0208_MS5022X_Decoder.index1; + public CharsetDecoder newDecoder() { + return new Decoder(this, DEC0208, DEC0212); } - protected String[] getDecIndex2() { - return JIS_X_0208_MS5022X_Decoder.index2; + public CharsetEncoder newEncoder() { + return new Encoder(this, ENC0208, ENC0212, doSBKANA()); } - protected DoubleByteDecoder get0212Decoder() { - return new JIS_X_0212_MS5022X_Decoder(this); - } + private final static DoubleByte.Decoder DEC0208 = + (DoubleByte.Decoder)new JIS_X_0208_MS5022X().newDecoder(); - protected short[] getEncIndex1() { - return JIS_X_0208_MS5022X_Encoder.index1; - } + private final static DoubleByte.Decoder DEC0212 = + (DoubleByte.Decoder)new JIS_X_0212_MS5022X().newDecoder(); - protected String[] getEncIndex2() { - return JIS_X_0208_MS5022X_Encoder.index2; - } + private final static DoubleByte.Encoder ENC0208 = + (DoubleByte.Encoder)new JIS_X_0208_MS5022X().newEncoder(); - protected DoubleByteEncoder get0212Encoder() { - return new JIS_X_0212_MS5022X_Encoder(this); - } + private final static DoubleByte.Encoder ENC0212 = + (DoubleByte.Encoder)new JIS_X_0212_MS5022X().newEncoder(); protected boolean doSBKANA() { return false;