Class CharsetISO2022

  • All Implemented Interfaces:
    java.lang.Comparable<java.nio.charset.Charset>

    class CharsetISO2022
    extends CharsetICU
    • Field Detail

      • variant

        private int variant
      • SHIFT_IN_STR

        private static final byte[] SHIFT_IN_STR
      • jpCharsetMasks

        private static final short[] jpCharsetMasks
      • UCNV_2022_MAX_CONVERTERS

        private static final byte UCNV_2022_MAX_CONVERTERS
        See Also:
        Constant Field Values
      • VALID_NON_TERMINAL_2022

        private static final byte VALID_NON_TERMINAL_2022
        See Also:
        Constant Field Values
      • VALID_MAYBE_TERMINAL_2022

        private static final byte VALID_MAYBE_TERMINAL_2022
        See Also:
        Constant Field Values
      • normalize_esq_chars_2022

        private static final byte[] normalize_esq_chars_2022
      • escSeqStateTable_Key_2022

        private static final int[] escSeqStateTable_Key_2022
      • escSeqStateTable_Value_2022

        private static final byte[] escSeqStateTable_Value_2022
      • nextStateToUnicodeJP

        private static final byte[] nextStateToUnicodeJP
        Recognized escape sequenes are (B ASCII .A ISO-8859-1 .F ISO-8859-7 (J JISX-201 (I JISX-201 $B JISX-208 $@ JISX-208 $(D JISX-212 $A GB2312 $(C KSC5601
      • nextStateToUnicodeCN

        private static final byte[] nextStateToUnicodeCN
      • jpCharsetPref

        private static final byte[] jpCharsetPref
        from unicode
      • escSeqChars

        private static final byte[][] escSeqChars
      • hwkana_fb

        private static final char[] hwkana_fb
      • fromUSubstitutionChar

        protected byte[][] fromUSubstitutionChar
      • GB_2312_80_STR

        private static final byte[] GB_2312_80_STR
        ISO-2022-CN
      • ISO_IR_165_STR

        private static final byte[] ISO_IR_165_STR
      • CNS_11643_1992_Plane_1_STR

        private static final byte[] CNS_11643_1992_Plane_1_STR
      • CNS_11643_1992_Plane_2_STR

        private static final byte[] CNS_11643_1992_Plane_2_STR
      • CNS_11643_1992_Plane_3_STR

        private static final byte[] CNS_11643_1992_Plane_3_STR
      • CNS_11643_1992_Plane_4_STR

        private static final byte[] CNS_11643_1992_Plane_4_STR
      • CNS_11643_1992_Plane_5_STR

        private static final byte[] CNS_11643_1992_Plane_5_STR
      • CNS_11643_1992_Plane_6_STR

        private static final byte[] CNS_11643_1992_Plane_6_STR
      • CNS_11643_1992_Plane_7_STR

        private static final byte[] CNS_11643_1992_Plane_7_STR
      • escSeqCharsCN

        private static final byte[][] escSeqCharsCN
        ISO2022-CN Data
    • Constructor Detail

      • CharsetISO2022

        public CharsetISO2022​(java.lang.String icuCanonicalName,
                              java.lang.String javaCanonicalName,
                              java.lang.String[] aliases)
    • Method Detail

      • ISO2022InitJP

        private void ISO2022InitJP​(int version)
      • ISO2022InitCN

        private void ISO2022InitCN​(int version)
      • ISO2022InitKR

        private void ISO2022InitKR​(int version)
      • IS_2022_CONTROL

        private static boolean IS_2022_CONTROL​(int c)
      • _2022FromGR94DBCS

        private static int _2022FromGR94DBCS​(int value)
      • IS_JP_DBCS

        private static boolean IS_JP_DBCS​(byte cs)
      • CSM

        private static short CSM​(short cs)
      • getEndOfBuffer_2022

        private static int getEndOfBuffer_2022​(java.nio.ByteBuffer source)
      • MBCSSimpleGetNextUChar

        private int MBCSSimpleGetNextUChar​(UConverterSharedData sharedData,
                                           java.nio.ByteBuffer source,
                                           boolean useFallback)
      • MBCSSingleFromUChar32

        static int MBCSSingleFromUChar32​(UConverterSharedData sharedData,
                                         int c,
                                         int[] retval,
                                         boolean useFallback)
      • changeState_2022

        private java.nio.charset.CoderResult changeState_2022​(CharsetDecoderICU decoder,
                                                              java.nio.ByteBuffer source,
                                                              int var)
      • getKey_2022

        private static byte getKey_2022​(byte c,
                                        int[] key,
                                        int[] offset)
      • toUnicodeCallback

        private static java.nio.charset.CoderResult toUnicodeCallback​(CharsetDecoderICU cnv,
                                                                      int sourceChar,
                                                                      int targetUniChar)
      • newDecoder

        public java.nio.charset.CharsetDecoder newDecoder()
        Specified by:
        newDecoder in class java.nio.charset.Charset
      • newEncoder

        public java.nio.charset.CharsetEncoder newEncoder()
        Specified by:
        newEncoder in class java.nio.charset.Charset
      • setInitialStateToUnicodeKR

        private void setInitialStateToUnicodeKR()
      • setInitialStateFromUnicodeKR

        private void setInitialStateFromUnicodeKR​(CharsetEncoderICU cnv)
      • getUnicodeSetImpl

        void getUnicodeSetImpl​(UnicodeSet setFillIn,
                               int which)
        Description copied from class: CharsetICU
        This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored. Detects Unicode signature byte sequences at the start of the byte stream and returns number of bytes of the BOM of the indicated Unicode charset. 0 is returned when no Unicode signature is recognized.
        Specified by:
        getUnicodeSetImpl in class CharsetICU