Package com.ibm.icu.charset
Class CharsetISO2022
- java.lang.Object
-
- java.nio.charset.Charset
-
- com.ibm.icu.charset.CharsetICU
-
- com.ibm.icu.charset.CharsetISO2022
-
- All Implemented Interfaces:
java.lang.Comparable<java.nio.charset.Charset>
class CharsetISO2022 extends CharsetICU
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
CharsetISO2022.CharsetDecoderISO2022CN
ISO-2022-CNprivate class
CharsetISO2022.CharsetDecoderISO2022JP
ISO-2022-JPprivate class
CharsetISO2022.CharsetDecoderISO2022KR
ISO-2022-KRprivate class
CharsetISO2022.CharsetEncoderISO2022CN
private class
CharsetISO2022.CharsetEncoderISO2022JP
ISO-2022-JPprivate class
CharsetISO2022.CharsetEncoderISO2022KR
ISO-2022-KRprivate static class
CharsetISO2022.ISO2022State
private static class
CharsetISO2022.UConverterDataISO2022
-
Field Summary
Fields Modifier and Type Field Description private static byte
ASCII
private static byte
CNS_11643
private static byte
CNS_11643_0
private static byte
CNS_11643_1
private static byte[]
CNS_11643_1992_Plane_1_STR
private static byte[]
CNS_11643_1992_Plane_2_STR
private static byte[]
CNS_11643_1992_Plane_3_STR
private static byte[]
CNS_11643_1992_Plane_4_STR
private static byte[]
CNS_11643_1992_Plane_5_STR
private static byte[]
CNS_11643_1992_Plane_6_STR
private static byte[]
CNS_11643_1992_Plane_7_STR
private static byte
CNS_11643_2
private static byte
CNS_11643_3
private static byte
CNS_11643_4
private static byte
CNS_11643_5
private static byte
CNS_11643_6
private static byte
CNS_11643_7
private static byte
CR
private static byte
ESC_2022
private static byte[][]
escSeqChars
private static byte[][]
escSeqCharsCN
ISO2022-CN Dataprivate static int[]
escSeqStateTable_Key_2022
private static byte[]
escSeqStateTable_Value_2022
protected byte[][]
fromUSubstitutionChar
private static byte[]
GB_2312_80_STR
ISO-2022-CNprivate static byte
GB2312
private static byte
GB2312_1
private static char
GR96_END
private static char
GR96_START
private static byte
HWKANA_7BIT
private static char
HWKANA_END
private static char[]
hwkana_fb
private static char
HWKANA_START
private static byte
INVALID_2022
private static byte
INVALID_STATE
private static byte
ISO_2022_CN
private static byte
ISO_2022_JP
private static byte
ISO_2022_KR
private static byte
ISO_IR_165
private static byte[]
ISO_IR_165_STR
private static byte
ISO8859_1
private static byte
ISO8859_7
private static byte
JISX201
private static byte
JISX208
private static byte
JISX212
private static short[]
jpCharsetMasks
private static byte[]
jpCharsetPref
from unicodeprivate static byte
KSC5601
private static byte
LF
private static short
MAX_STATES_2022
private CharsetISO2022.UConverterDataISO2022
myConverterData
private static byte[]
nextStateToUnicodeCN
private static 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 private static byte[]
normalize_esq_chars_2022
private static byte[]
SHIFT_IN_STR
private static byte
SS2_STATE
private static byte
SS3_STATE
private static byte
UCNV_2022_MAX_CONVERTERS
private static byte
VALID_MAYBE_TERMINAL_2022
private static byte
VALID_NON_TERMINAL_2022
private static byte
VALID_TERMINAL_2022
private int
variant
-
Fields inherited from class com.ibm.icu.charset.CharsetICU
codepage, conversionType, hasFromUnicodeFallback, hasToUnicodeFallback, icuCanonicalName, maxBytesPerChar, maxCharsPerByte, minBytesPerChar, name, options, platform, ROUNDTRIP_AND_FALLBACK_SET, ROUNDTRIP_SET, subChar, subChar1, subCharLen, unicodeMask
-
-
Constructor Summary
Constructors Constructor Description CharsetISO2022(java.lang.String icuCanonicalName, java.lang.String javaCanonicalName, java.lang.String[] aliases)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
_2022FromGR94DBCS(int value)
private java.nio.charset.CoderResult
changeState_2022(CharsetDecoderICU decoder, java.nio.ByteBuffer source, int var)
private static short
CSM(short cs)
private static int
getEndOfBuffer_2022(java.nio.ByteBuffer source)
private static byte
getKey_2022(byte c, int[] key, int[] offset)
(package private) void
getUnicodeSetImpl(UnicodeSet setFillIn, int which)
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.private static boolean
IS_2022_CONTROL(int c)
private static boolean
IS_JP_DBCS(byte cs)
private void
ISO2022InitCN(int version)
private void
ISO2022InitJP(int version)
private void
ISO2022InitKR(int version)
private int
MBCSSimpleGetNextUChar(UConverterSharedData sharedData, java.nio.ByteBuffer source, boolean useFallback)
(package private) static int
MBCSSingleFromUChar32(UConverterSharedData sharedData, int c, int[] retval, boolean useFallback)
java.nio.charset.CharsetDecoder
newDecoder()
java.nio.charset.CharsetEncoder
newEncoder()
private void
setInitialStateFromUnicodeKR(CharsetEncoderICU cnv)
private void
setInitialStateToUnicodeKR()
private static java.nio.charset.CoderResult
toUnicodeCallback(CharsetDecoderICU cnv, int sourceChar, int targetUniChar)
-
Methods inherited from class com.ibm.icu.charset.CharsetICU
contains, forNameICU, getCharset, getCompleteUnicodeSet, getNonSurrogateUnicodeSet, getUnicodeSet, isFixedWidth, isSurrogate
-
-
-
-
Field Detail
-
myConverterData
private CharsetISO2022.UConverterDataISO2022 myConverterData
-
variant
private int variant
-
SHIFT_IN_STR
private static final byte[] SHIFT_IN_STR
-
CR
private static final byte CR
- See Also:
- Constant Field Values
-
LF
private static final byte LF
- See Also:
- Constant Field Values
-
HWKANA_START
private static final char HWKANA_START
- See Also:
- Constant Field Values
-
HWKANA_END
private static final char HWKANA_END
- See Also:
- Constant Field Values
-
GR96_START
private static final char GR96_START
- See Also:
- Constant Field Values
-
GR96_END
private static final char GR96_END
- See Also:
- Constant Field Values
-
INVALID_STATE
private static final byte INVALID_STATE
- See Also:
- Constant Field Values
-
ASCII
private static final byte ASCII
- See Also:
- Constant Field Values
-
SS2_STATE
private static final byte SS2_STATE
- See Also:
- Constant Field Values
-
SS3_STATE
private static final byte SS3_STATE
- See Also:
- Constant Field Values
-
ISO8859_1
private static final byte ISO8859_1
- See Also:
- Constant Field Values
-
ISO8859_7
private static final byte ISO8859_7
- See Also:
- Constant Field Values
-
JISX201
private static final byte JISX201
- See Also:
- Constant Field Values
-
JISX208
private static final byte JISX208
- See Also:
- Constant Field Values
-
JISX212
private static final byte JISX212
- See Also:
- Constant Field Values
-
GB2312
private static final byte GB2312
- See Also:
- Constant Field Values
-
KSC5601
private static final byte KSC5601
- See Also:
- Constant Field Values
-
HWKANA_7BIT
private static final byte HWKANA_7BIT
- See Also:
- Constant Field Values
-
GB2312_1
private static final byte GB2312_1
- See Also:
- Constant Field Values
-
ISO_IR_165
private static final byte ISO_IR_165
- See Also:
- Constant Field Values
-
CNS_11643
private static final byte CNS_11643
- See Also:
- Constant Field Values
-
CNS_11643_0
private static final byte CNS_11643_0
- See Also:
- Constant Field Values
-
CNS_11643_1
private static final byte CNS_11643_1
- See Also:
- Constant Field Values
-
CNS_11643_2
private static final byte CNS_11643_2
- See Also:
- Constant Field Values
-
CNS_11643_3
private static final byte CNS_11643_3
- See Also:
- Constant Field Values
-
CNS_11643_4
private static final byte CNS_11643_4
- See Also:
- Constant Field Values
-
CNS_11643_5
private static final byte CNS_11643_5
- See Also:
- Constant Field Values
-
CNS_11643_6
private static final byte CNS_11643_6
- See Also:
- Constant Field Values
-
CNS_11643_7
private static final byte CNS_11643_7
- See Also:
- Constant Field Values
-
jpCharsetMasks
private static final short[] jpCharsetMasks
-
UCNV_2022_MAX_CONVERTERS
private static final byte UCNV_2022_MAX_CONVERTERS
- See Also:
- Constant Field Values
-
ESC_2022
private static final byte ESC_2022
- See Also:
- Constant Field Values
-
INVALID_2022
private static final byte INVALID_2022
- See Also:
- Constant Field Values
-
VALID_NON_TERMINAL_2022
private static final byte VALID_NON_TERMINAL_2022
- See Also:
- Constant Field Values
-
VALID_TERMINAL_2022
private static final byte VALID_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
-
MAX_STATES_2022
private static final short MAX_STATES_2022
- See Also:
- Constant Field Values
-
escSeqStateTable_Key_2022
private static final int[] escSeqStateTable_Key_2022
-
escSeqStateTable_Value_2022
private static final byte[] escSeqStateTable_Value_2022
-
ISO_2022_JP
private static final byte ISO_2022_JP
- See Also:
- Constant Field Values
-
ISO_2022_KR
private static final byte ISO_2022_KR
- See Also:
- Constant Field Values
-
ISO_2022_CN
private static final byte ISO_2022_CN
- See Also:
- Constant Field Values
-
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
-
-
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 classjava.nio.charset.Charset
-
newEncoder
public java.nio.charset.CharsetEncoder newEncoder()
- Specified by:
newEncoder
in classjava.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 classCharsetICU
-
-