Class CharsetMBCS.CharsetDecoderMBCS

Enclosing class:
CharsetMBCS

class CharsetMBCS.CharsetDecoderMBCS extends CharsetDecoderICU
  • Constructor Details

    • CharsetDecoderMBCS

      CharsetDecoderMBCS(CharsetICU cs)
  • Method Details

    • decodeLoop

      protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)
      Specified by:
      decodeLoop in class CharsetDecoderICU
    • 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

      private CoderResult writeToU(int value, CharBuffer target, IntBuffer offsets, int srcIndex)
    • toUWriteCodePoint

      private CoderResult toUWriteCodePoint(int c, CharBuffer target, IntBuffer offsets, int sourceIndex)
    • 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

      private int simpleMatchToU(ByteBuffer source, boolean useFallback)
    • 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

      private int getFallback(CharsetMBCS.UConverterMBCSTable mbcsTable, int offset)
    • simpleGetNextUChar

      int simpleGetNextUChar(ByteBuffer source, boolean useFallback)
      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)