Class CharsetMBCS.CharsetDecoderMBCS

    • Constructor Detail

      • CharsetDecoderMBCS

        CharsetDecoderMBCS​(CharsetICU cs)
    • Method Detail

      • decodeLoop

        protected java.nio.charset.CoderResult decodeLoop​(java.nio.ByteBuffer source,
                                                          java.nio.CharBuffer target,
                                                          java.nio.IntBuffer offsets,
                                                          boolean flush)
        Specified by:
        decodeLoop in class CharsetDecoderICU
      • continueMatchToU

        private java.nio.charset.CoderResult continueMatchToU​(java.nio.ByteBuffer source,
                                                              java.nio.CharBuffer target,
                                                              java.nio.IntBuffer offsets,
                                                              int srcIndex,
                                                              boolean flush)
      • matchToU

        private int matchToU​(byte sisoState,
                             byte[] preArray,
                             int preArrayBegin,
                             int preLength,
                             java.nio.ByteBuffer source,
                             int[] pMatchValue,
                             boolean isUseFallback,
                             boolean flush)
      • writeToU

        private java.nio.charset.CoderResult writeToU​(int value,
                                                      java.nio.CharBuffer target,
                                                      java.nio.IntBuffer offsets,
                                                      int srcIndex)
      • toUWriteCodePoint

        private java.nio.charset.CoderResult toUWriteCodePoint​(int c,
                                                               java.nio.CharBuffer target,
                                                               java.nio.IntBuffer offsets,
                                                               int sourceIndex)
      • toU

        private int toU​(int length,
                        java.nio.ByteBuffer source,
                        java.nio.CharBuffer target,
                        java.nio.IntBuffer offsets,
                        int sourceIndex,
                        boolean flush,
                        java.nio.charset.CoderResult[] cr)
      • initialMatchToU

        private boolean initialMatchToU​(int firstLength,
                                        java.nio.ByteBuffer source,
                                        java.nio.CharBuffer target,
                                        java.nio.IntBuffer offsets,
                                        int srcIndex,
                                        boolean flush,
                                        java.nio.charset.CoderResult[] cr)
      • simpleMatchToU

        private int simpleMatchToU​(java.nio.ByteBuffer source,
                                   boolean useFallback)
      • cnvMBCSToUnicodeWithOffsets

        java.nio.charset.CoderResult cnvMBCSToUnicodeWithOffsets​(java.nio.ByteBuffer source,
                                                                 java.nio.CharBuffer target,
                                                                 java.nio.IntBuffer offsets,
                                                                 boolean flush)
      • cnvMBCSSingleToBMPWithOffsets

        private java.nio.charset.CoderResult cnvMBCSSingleToBMPWithOffsets​(java.nio.ByteBuffer source,
                                                                           java.nio.CharBuffer target,
                                                                           java.nio.IntBuffer offsets,
                                                                           boolean flush)
      • cnvMBCSSingleToUnicodeWithOffsets

        private java.nio.charset.CoderResult cnvMBCSSingleToUnicodeWithOffsets​(java.nio.ByteBuffer source,
                                                                               java.nio.CharBuffer target,
                                                                               java.nio.IntBuffer offsets,
                                                                               boolean flush)
      • simpleGetNextUChar

        int simpleGetNextUChar​(java.nio.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)