src/share/classes/sun/nio/cs/ext/MSISO2022JP.java
Print this page
@@ -24,10 +24,12 @@
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
public class MSISO2022JP extends ISO2022_JP
{
public MSISO2022JP() {
super("x-windows-iso2022jp",
@@ -41,33 +43,19 @@
public boolean contains(Charset cs) {
return super.contains(cs) ||
(cs instanceof MSISO2022JP);
}
- protected short[] getDecIndex1() {
- return JIS_X_0208_MS932_Decoder.index1;
+ public CharsetDecoder newDecoder() {
+ return new Decoder(this, DEC0208, null);
}
- protected String[] getDecIndex2() {
- return JIS_X_0208_MS932_Decoder.index2;
+ public CharsetEncoder newEncoder() {
+ return new Encoder(this, ENC0208, null, true);
}
- protected DoubleByteDecoder get0212Decoder() {
- return null;
- }
-
- protected short[] getEncIndex1() {
- return JIS_X_0208_MS932_Encoder.index1;
- }
-
- protected String[] getEncIndex2() {
- return JIS_X_0208_MS932_Encoder.index2;
- }
-
- protected DoubleByteEncoder get0212Encoder() {
- return null;
- }
+ private final static DoubleByte.Decoder DEC0208 =
+ (DoubleByte.Decoder)new JIS_X_0208_MS932().newDecoder();
- protected boolean doSBKANA() {
- return true;
- }
+ private final static DoubleByte.Encoder ENC0208 =
+ (DoubleByte.Encoder)new JIS_X_0208_MS932().newEncoder();
}