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 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 CoderResultcnvMBCSSingleToBMPWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private CoderResultcnvMBCSSingleToUnicodeWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) (package private) CoderResultcnvMBCSToUnicodeWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private CoderResultcontinueMatchToU(ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush) protected CoderResultdecodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private intgetFallback(CharsetMBCS.UConverterMBCSTable mbcsTable, int offset) private booleanhasValidTrailBytes(int[][] stateTable, short state) private booleaninitialMatchToU(int firstLength, ByteBuffer source, CharBuffer target, IntBuffer offsets, int srcIndex, boolean flush, CoderResult[] cr) private booleanisSingleOrLead(int[][] stateTable, int state, boolean isDBCSOnly, int b) private intmatchToU(byte sisoState, byte[] preArray, int preArrayBegin, int preLength, ByteBuffer source, int[] pMatchValue, boolean isUseFallback, boolean flush) (package private) intsimpleGetNextUChar(ByteBuffer source, boolean useFallback) This is a simple version of _MBCSGetNextUChar() that is used by other converter implementations.private intsimpleMatchToU(ByteBuffer source, boolean useFallback) private inttoU(int length, ByteBuffer source, CharBuffer target, IntBuffer offsets, int sourceIndex, boolean flush, CoderResult[] cr) private CoderResulttoUWriteCodePoint(int c, CharBuffer target, IntBuffer offsets, int sourceIndex) private CoderResultwriteToU(int value, CharBuffer target, IntBuffer offsets, int srcIndex) Methods inherited from class CharsetDecoderICU
decode, decodeLoop, implFlush, implOnMalformedInput, implOnUnmappableCharacter, implReset, isFallbackUsed, isToUUseFallback, isToUUseFallback, maxBytesPerChar, setToUCallback, toUCountPending, toUnicodeWithCallback, toUWriteUCharsMethods inherited from class 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:
decodeLoopin 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)
-