Class CharsetMBCS

  • All Implemented Interfaces:
    java.lang.Comparable<java.nio.charset.Charset>

    class CharsetMBCS
    extends CharsetICU
    • Constructor Detail

      • CharsetMBCS

        public CharsetMBCS​(java.lang.String icuCanonicalName,
                           java.lang.String javaCanonicalName,
                           java.lang.String[] aliases,
                           java.lang.String classPath,
                           java.lang.ClassLoader loader)
                    throws InvalidFormatException
        Throws:
        InvalidFormatException
    • Method Detail

      • reconstituteData

        private static void reconstituteData​(CharsetMBCS.UConverterMBCSTable mbcsTable,
                                             int stage1Length,
                                             int stage2Length,
                                             int fullStage2Length)
      • getStateProp

        private static byte getStateProp​(int[][] stateTable,
                                         byte[] stateProps,
                                         int state)
      • initializeConverter

        protected void initializeConverter​(int myOptions)
      • EBCDICSwapLFNL

        private boolean EBCDICSwapLFNL()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • LINEAR_18030

        private static int LINEAR_18030​(int a,
                                        int b,
                                        int c,
                                        int d)
      • LINEAR

        private static int LINEAR​(int x)
      • getSISOBytes

        private static int getSISOBytes​(CharsetMBCS.SISO_Option option,
                                        int cnvOption,
                                        byte[] value)
      • MBCS_ENTRY_SET_STATE

        static int MBCS_ENTRY_SET_STATE​(int entry,
                                        int state)
      • MBCS_ENTRY_STATE

        static int MBCS_ENTRY_STATE​(int entry)
      • MBCS_ENTRY_TRANSITION

        static int MBCS_ENTRY_TRANSITION​(int state,
                                         int offset)
      • MBCS_ENTRY_FINAL

        static int MBCS_ENTRY_FINAL​(int state,
                                    int action,
                                    int value)
      • MBCS_ENTRY_IS_TRANSITION

        static boolean MBCS_ENTRY_IS_TRANSITION​(int entry)
      • MBCS_ENTRY_IS_FINAL

        static boolean MBCS_ENTRY_IS_FINAL​(int entry)
      • MBCS_ENTRY_TRANSITION_STATE

        static int MBCS_ENTRY_TRANSITION_STATE​(int entry)
      • MBCS_ENTRY_TRANSITION_OFFSET

        static int MBCS_ENTRY_TRANSITION_OFFSET​(int entry)
      • MBCS_ENTRY_FINAL_STATE

        static int MBCS_ENTRY_FINAL_STATE​(int entry)
      • MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16

        static boolean MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16​(int entry)
      • MBCS_ENTRY_FINAL_ACTION

        static int MBCS_ENTRY_FINAL_ACTION​(int entry)
      • MBCS_ENTRY_FINAL_VALUE

        static int MBCS_ENTRY_FINAL_VALUE​(int entry)
      • MBCS_ENTRY_FINAL_VALUE_16

        static char MBCS_ENTRY_FINAL_VALUE_16​(int entry)
      • MBCS_IS_ASCII_ROUNDTRIP

        static boolean MBCS_IS_ASCII_ROUNDTRIP​(int b,
                                               long asciiRoundtrips)
      • MBCS_SINGLE_SIMPLE_GET_NEXT_BMP

        static char MBCS_SINGLE_SIMPLE_GET_NEXT_BMP​(CharsetMBCS.UConverterMBCSTable mbcs,
                                                    int b)
        This macro version of _MBCSSingleSimpleGetNextUChar() gets a code point from a byte. It works for single-byte, single-state codepages that only map to and from BMP code points, and it always returns fallback values.
      • MBCS_SINGLE_RESULT_FROM_U

        static char MBCS_SINGLE_RESULT_FROM_U​(char[] table,
                                              char[] results,
                                              int c)
      • MBCS_SINGLE_RESULT_FROM_U_SET

        static void MBCS_SINGLE_RESULT_FROM_U_SET​(char[] table,
                                                  char[] results,
                                                  int c,
                                                  int newValue)
      • MBCS_STAGE_2_FROM_U

        static int MBCS_STAGE_2_FROM_U​(char[] table,
                                       int[] tableInts,
                                       int c)
      • MBCS_FROM_U_IS_ROUNDTRIP

        private static boolean MBCS_FROM_U_IS_ROUNDTRIP​(int stage2Entry,
                                                        int c)
      • MBCS_VALUE_2_FROM_STAGE_2

        static char MBCS_VALUE_2_FROM_STAGE_2​(char[] chars,
                                              int stage2Entry,
                                              int c)
      • MBCS_VALUE_2_FROM_STAGE_2_SET

        static void MBCS_VALUE_2_FROM_STAGE_2_SET​(char[] chars,
                                                  int stage2Entry,
                                                  int c,
                                                  int newValue)
      • MBCS_VALUE_4_FROM_STAGE_2

        private static int MBCS_VALUE_4_FROM_STAGE_2​(int[] ints,
                                                     int stage2Entry,
                                                     int c)
      • MBCS_POINTER_3_FROM_STAGE_2

        static int MBCS_POINTER_3_FROM_STAGE_2​(byte[] bytes,
                                               int stage2Entry,
                                               int c)
      • TO_U_GET_BYTE

        static int TO_U_GET_BYTE​(int word)
      • TO_U_GET_VALUE

        static int TO_U_GET_VALUE​(int word)
      • TO_U_IS_ROUNDTRIP

        static boolean TO_U_IS_ROUNDTRIP​(int value)
      • TO_U_IS_PARTIAL

        static boolean TO_U_IS_PARTIAL​(int value)
      • TO_U_GET_PARTIAL_INDEX

        static int TO_U_GET_PARTIAL_INDEX​(int value)
      • TO_U_MASK_ROUNDTRIP

        static int TO_U_MASK_ROUNDTRIP​(int value)
      • TO_U_MAKE_WORD

        private static int TO_U_MAKE_WORD​(byte b,
                                          int value)
      • TO_U_IS_CODE_POINT

        static boolean TO_U_IS_CODE_POINT​(int value)
      • TO_U_GET_CODE_POINT

        static int TO_U_GET_CODE_POINT​(int value)
      • TO_U_GET_INDEX

        private static int TO_U_GET_INDEX​(int value)
      • TO_U_GET_LENGTH

        private static int TO_U_GET_LENGTH​(int value)
      • FROM_U

        static int FROM_U​(java.nio.CharBuffer stage12,
                          java.nio.CharBuffer stage3,
                          int s1Index,
                          int c)
      • FROM_U_IS_PARTIAL

        static boolean FROM_U_IS_PARTIAL​(int value)
      • FROM_U_GET_PARTIAL_INDEX

        static int FROM_U_GET_PARTIAL_INDEX​(int value)
      • FROM_U_IS_ROUNDTRIP

        static boolean FROM_U_IS_ROUNDTRIP​(int value)
      • FROM_U_MASK_ROUNDTRIP

        private static int FROM_U_MASK_ROUNDTRIP​(int value)
      • FROM_U_GET_LENGTH

        static int FROM_U_GET_LENGTH​(int value)
      • FROM_U_GET_DATA

        static int FROM_U_GET_DATA​(int value)
      • ARRAY

        static java.nio.Buffer ARRAY​(java.nio.ByteBuffer indexes,
                                     int index,
                                     java.lang.Class<?> itemType)
      • GET_MAX_BYTES_PER_UCHAR

        private static int GET_MAX_BYTES_PER_UCHAR​(java.nio.ByteBuffer indexes)
      • findFromU

        static int findFromU​(java.nio.CharBuffer fromUSection,
                             int length,
                             char u)
      • findToU

        static int findToU​(java.nio.IntBuffer toUSection,
                           int length,
                           short byt)
      • TO_U_VERIFY_SISO_MATCH

        static boolean TO_U_VERIFY_SISO_MATCH​(byte sisoState,
                                              int match)
      • newDecoder

        public java.nio.charset.CharsetDecoder newDecoder()
        Specified by:
        newDecoder in class java.nio.charset.Charset
      • newEncoder

        public java.nio.charset.CharsetEncoder newEncoder()
        Specified by:
        newEncoder in class java.nio.charset.Charset
      • MBCSGetFilteredUnicodeSetForUnicode

        void MBCSGetFilteredUnicodeSetForUnicode​(UConverterSharedData data,
                                                 UnicodeSet setFillIn,
                                                 int which,
                                                 int filter)
      • extGetUnicodeSetString

        static void extGetUnicodeSetString​(java.nio.ByteBuffer cx,
                                           UnicodeSet setFillIn,
                                           boolean useFallback,
                                           int minLength,
                                           int c,
                                           char[] s,
                                           int length,
                                           int sectionIndex)
      • 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 class CharsetICU