24 */ |
24 */ |
25 |
25 |
26 package sun.nio.cs.ext; |
26 package sun.nio.cs.ext; |
27 |
27 |
28 import java.nio.charset.Charset; |
28 import java.nio.charset.Charset; |
|
29 import java.nio.charset.CharsetDecoder; |
|
30 import java.nio.charset.CharsetEncoder; |
29 |
31 |
30 public class MS50220 extends ISO2022_JP |
32 public class MS50220 extends ISO2022_JP |
31 { |
33 { |
32 public MS50220() { |
34 public MS50220() { |
33 super("x-windows-50220", |
35 super("x-windows-50220", |
34 ExtendedCharsets.aliasesFor("x-windows-50220")); |
36 ExtendedCharsets.aliasesFor("x-windows-50220")); |
|
37 } |
|
38 |
|
39 protected MS50220(String canonicalName, String[] aliases) { |
|
40 super(canonicalName, aliases); |
35 } |
41 } |
36 |
42 |
37 public String historicalName() { |
43 public String historicalName() { |
38 return "MS50220"; |
44 return "MS50220"; |
39 } |
45 } |
42 return super.contains(cs) || |
48 return super.contains(cs) || |
43 (cs instanceof JIS_X_0212) || |
49 (cs instanceof JIS_X_0212) || |
44 (cs instanceof MS50220); |
50 (cs instanceof MS50220); |
45 } |
51 } |
46 |
52 |
47 protected short[] getDecIndex1() { |
53 public CharsetDecoder newDecoder() { |
48 return JIS_X_0208_MS5022X_Decoder.index1; |
54 return new Decoder(this, DEC0208, DEC0212); |
49 } |
55 } |
50 |
56 |
51 protected String[] getDecIndex2() { |
57 public CharsetEncoder newEncoder() { |
52 return JIS_X_0208_MS5022X_Decoder.index2; |
58 return new Encoder(this, ENC0208, ENC0212, doSBKANA()); |
53 } |
59 } |
54 |
60 |
55 protected DoubleByteDecoder get0212Decoder() { |
61 private final static DoubleByte.Decoder DEC0208 = |
56 return new JIS_X_0212_MS5022X_Decoder(this); |
62 (DoubleByte.Decoder)new JIS_X_0208_MS5022X().newDecoder(); |
57 } |
|
58 |
63 |
59 protected short[] getEncIndex1() { |
64 private final static DoubleByte.Decoder DEC0212 = |
60 return JIS_X_0208_MS5022X_Encoder.index1; |
65 (DoubleByte.Decoder)new JIS_X_0212_MS5022X().newDecoder(); |
61 } |
|
62 |
66 |
63 protected String[] getEncIndex2() { |
67 private final static DoubleByte.Encoder ENC0208 = |
64 return JIS_X_0208_MS5022X_Encoder.index2; |
68 (DoubleByte.Encoder)new JIS_X_0208_MS5022X().newEncoder(); |
65 } |
|
66 |
69 |
67 protected DoubleByteEncoder get0212Encoder() { |
70 private final static DoubleByte.Encoder ENC0212 = |
68 return new JIS_X_0212_MS5022X_Encoder(this); |
71 (DoubleByte.Encoder)new JIS_X_0212_MS5022X().newEncoder(); |
69 } |
|
70 |
72 |
71 protected boolean doSBKANA() { |
73 protected boolean doSBKANA() { |
72 return false; |
74 return false; |
73 } |
75 } |
74 } |
76 } |