Package com.ibm.icu.charset
Class CharsetMBCS.CharsetDecoderMBCS
java.lang.Object
java.nio.charset.CharsetDecoder
com.ibm.icu.charset.CharsetDecoderICU
com.ibm.icu.charset.CharsetMBCS.CharsetDecoderMBCS
- Enclosing class:
CharsetMBCS
-
Field Summary
Fields inherited from class com.ibm.icu.charset.CharsetDecoderICU
charErrorBufferArray, charErrorBufferBegin, charErrorBufferLength, EXT_MAX_BYTES, invalidCharBuffer, invalidCharLength, mode, preToUArray, preToUBegin, preToUFirstLength, preToULength, toCharErrorBehaviour, toUBytesArray, toUBytesBegin, toUContext, toULength, toUnicodeStatus
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate CoderResult
cnvMBCSSingleToBMPWithOffsets
(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private CoderResult
cnvMBCSSingleToUnicodeWithOffsets
(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) (package private) CoderResult
cnvMBCSToUnicodeWithOffsets
(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private CoderResult
continueMatchToU
(ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush) protected CoderResult
decodeLoop
(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private int
getFallback
(CharsetMBCS.UConverterMBCSTable mbcsTable, int offset) private boolean
hasValidTrailBytes
(int[][] stateTable, short state) private boolean
initialMatchToU
(int firstLength, ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush, CoderResult[] cr) private boolean
isSingleOrLead
(int[][] stateTable, int state, boolean isDBCSOnly, int b) private int
matchToU
(byte sisoState, byte[] preArray, int preArrayBegin, int preLength, ByteBuffer source, int[] pMatchValue, boolean isUseFallback, boolean flush) (package private) int
simpleGetNextUChar
(ByteBuffer source, boolean useFallback) This is a simple version of _MBCSGetNextUChar() that is used by other converter implementations.private int
simpleMatchToU
(ByteBuffer source, boolean useFallback) private int
toU
(int length, ByteBuffer source, CharBuffer target, IntBuffer offsets, int sourceIndex, boolean flush, CoderResult[] cr) private CoderResult
toUWriteCodePoint
(int c, CharBuffer target, IntBuffer offsets, int sourceIndex) private CoderResult
writeToU
(int value, CharBuffer target, IntBuffer offsets, int srcIndex) Methods inherited from class com.ibm.icu.charset.CharsetDecoderICU
decode, decodeLoop, implFlush, implOnMalformedInput, implOnUnmappableCharacter, implReset, isFallbackUsed, isToUUseFallback, isToUUseFallback, maxBytesPerChar, setToUCallback, toUCountPending, toUnicodeWithCallback, toUWriteUChars
Methods inherited from class java.nio.charset.CharsetDecoder
averageCharsPerByte, charset, decode, decode, detectedCharset, flush, implReplaceWith, isAutoDetecting, isCharsetDetected, malformedInputAction, maxCharsPerByte, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction
-
Constructor Details
-
CharsetDecoderMBCS
CharsetDecoderMBCS(CharsetICU cs)
-
-
Method Details
-
decodeLoop
protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) - Specified by:
decodeLoop
in classCharsetDecoderICU
-
continueMatchToU
private CoderResult continueMatchToU(ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush) -
matchToU
private int matchToU(byte sisoState, byte[] preArray, int preArrayBegin, int preLength, ByteBuffer source, int[] pMatchValue, boolean isUseFallback, boolean flush) -
writeToU
-
toUWriteCodePoint
-
toU
private int toU(int length, ByteBuffer source, CharBuffer target, IntBuffer offsets, int sourceIndex, boolean flush, CoderResult[] cr) -
initialMatchToU
private boolean initialMatchToU(int firstLength, ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush, CoderResult[] cr) -
simpleMatchToU
-
cnvMBCSToUnicodeWithOffsets
CoderResult cnvMBCSToUnicodeWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) -
cnvMBCSSingleToBMPWithOffsets
private CoderResult cnvMBCSSingleToBMPWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) -
cnvMBCSSingleToUnicodeWithOffsets
private CoderResult cnvMBCSSingleToUnicodeWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) -
getFallback
-
simpleGetNextUChar
This is a simple version of _MBCSGetNextUChar() that is used by other converter implementations. It only returns an "assigned" result if it consumes the entire input. It does not use state from the converter, nor error codes. It does not handle the EBCDIC swaplfnl option (set in UConverter). It handles conversion extensions but not GB 18030.- Returns:
- U+fffe unassigned U+ffff illegal otherwise the Unicode code point
-
hasValidTrailBytes
private boolean hasValidTrailBytes(int[][] stateTable, short state) -
isSingleOrLead
private boolean isSingleOrLead(int[][] stateTable, int state, boolean isDBCSOnly, int b)
-