--- a/jdk/src/share/classes/sun/nio/cs/ext/MS50220.java Tue Jul 24 03:31:44 2012 -0700
+++ b/jdk/src/share/classes/sun/nio/cs/ext/MS50220.java Tue Jul 24 12:17:39 2012 -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;
- }
-
- protected DoubleByteDecoder get0212Decoder() {
- return new JIS_X_0212_MS5022X_Decoder(this);
+ public CharsetEncoder newEncoder() {
+ return new Encoder(this, ENC0208, ENC0212, doSBKANA());
}
- protected short[] getEncIndex1() {
- return JIS_X_0208_MS5022X_Encoder.index1;
- }
+ private final static DoubleByte.Decoder DEC0208 =
+ (DoubleByte.Decoder)new JIS_X_0208_MS5022X().newDecoder();
+
+ 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;