Class UConverterAlias

java.lang.Object
com.ibm.icu.charset.UConverterAlias

final class UConverterAlias extends Object
  • Field Details

    • UNNORMALIZED

      static final int UNNORMALIZED
      See Also:
    • STD_NORMALIZED

      static final int STD_NORMALIZED
      See Also:
    • AMBIGUOUS_ALIAS_MAP_BIT

      static final int AMBIGUOUS_ALIAS_MAP_BIT
      See Also:
    • CONTAINS_OPTION_BIT

      static final int CONTAINS_OPTION_BIT
      See Also:
    • CONVERTER_INDEX_MASK

      static final int CONVERTER_INDEX_MASK
      See Also:
    • NUM_RESERVED_TAGS

      static final int NUM_RESERVED_TAGS
      See Also:
    • NUM_HIDDEN_TAGS

      static final int NUM_HIDDEN_TAGS
      See Also:
    • gConverterList

      static char[] gConverterList
    • gTagList

      static char[] gTagList
    • gAliasList

      static char[] gAliasList
    • gUntaggedConvArray

      static char[] gUntaggedConvArray
    • gTaggedAliasArray

      static char[] gTaggedAliasArray
    • gTaggedAliasLists

      static char[] gTaggedAliasLists
    • gOptionTable

      static char[] gOptionTable
    • gStringTable

      static byte[] gStringTable
    • gNormalizedStringTable

      static byte[] gNormalizedStringTable
    • tocLengthIndex

      static final int tocLengthIndex
      See Also:
    • converterListIndex

      private static final int converterListIndex
      See Also:
    • tagListIndex

      private static final int tagListIndex
      See Also:
    • aliasListIndex

      private static final int aliasListIndex
      See Also:
    • untaggedConvArrayIndex

      private static final int untaggedConvArrayIndex
      See Also:
    • taggedAliasArrayIndex

      private static final int taggedAliasArrayIndex
      See Also:
    • taggedAliasListsIndex

      private static final int taggedAliasListsIndex
      See Also:
    • optionTableIndex

      private static final int optionTableIndex
      See Also:
    • stringTableIndex

      private static final int stringTableIndex
      See Also:
    • normalizedStringTableIndex

      private static final int normalizedStringTableIndex
      See Also:
    • minTocLength

      private static final int minTocLength
      See Also:
    • offsetsCount

      private static final int offsetsCount
      See Also:
    • gAliasData

      static ByteBuffer gAliasData
    • CNVALIAS_DATA_FILE_NAME

      private static final String CNVALIAS_DATA_FILE_NAME
      See Also:
    • IGNORE

      private static final byte IGNORE
      See Also:
    • ZERO

      private static final byte ZERO
      See Also:
    • NONZERO

      private static final byte NONZERO
      See Also:
    • MINLETTER

      static final byte MINLETTER
      See Also:
    • asciiTypes

      static final byte[] asciiTypes
    • gAvailableConverters

      static String[] gAvailableConverters
    • gAvailableConverterCount

      static int gAvailableConverterCount
    • gDefaultConverterName

      static String gDefaultConverterName
  • Constructor Details

    • UConverterAlias

      UConverterAlias()
  • Method Details

    • GET_STRING

      private static final String GET_STRING(int idx)
    • GET_NORMALIZED_STRING

      private static final String GET_NORMALIZED_STRING(int idx)
    • extractString

      private static final String extractString(byte[] sArray, int sBegin)
    • strlen

      private static final int strlen(byte[] sArray, int sBegin)
    • isAlias

      private static final boolean isAlias(String alias)
    • haveAliasData

      private static final boolean haveAliasData() throws IOException
      Throws:
      IOException
    • findConverter

      private static final int findConverter(String alias, boolean[] isAmbigous)
    • stripForCompare

      public static final StringBuilder stripForCompare(StringBuilder dst, String name)
      stripForCompare Remove the underscores, dashes and spaces from the name, and convert the name to lower case.
      Parameters:
      dst - The destination buffer, which is invalid input: '<'= the buffer of name.
      name - The alias to strip
      Returns:
      the destination buffer.
    • GET_CHAR_TYPE

      private static final char GET_CHAR_TYPE(char c)
    • io_stripASCIIForCompare

      private static final StringBuilder io_stripASCIIForCompare(StringBuilder dst, String name)
      See Also:
    • compareNames

      static int compareNames(String name1, String name2)
      Do a fuzzy compare of a two converter/alias names. The comparison is case-insensitive. It also ignores the characters '-', '_', and ' ' (dash, underscore, and space). Thus the strings "UTF-8", "utf_8", and "Utf 8" are exactly equivalent. This is a symmetrical (commutative) operation; order of arguments is insignificant. This is an important property for sorting the list (when the list is preprocessed into binary form) and for performing binary searches on it at run time.
      Parameters:
      name1 - a converter name or alias, zero-terminated
      name2 - a converter name or alias, zero-terminated
      Returns:
      0 if the names match, or a negative value if the name1 lexically precedes name2, or a positive value if the name1 lexically follows name2.
      See Also:
    • io_countAliases

      static int io_countAliases(String alias) throws IOException
      Throws:
      IOException
    • io_getAlias

      static String io_getAlias(String alias, int n) throws IOException
      Return the number of all aliases (and converter names).
      Returns:
      the number of all aliases
      Throws:
      IOException
    • getStandardName

      static final String getStandardName(String alias, String standard) throws IOException
      Throws:
      IOException
    • countAliases

      static int countAliases(String alias) throws IOException
      Throws:
      IOException
    • getAlias

      static String getAlias(String alias, int n) throws IOException
      Throws:
      IOException
    • getAvailableName

      static String getAvailableName(int n)
    • getCanonicalName

      static String getCanonicalName(String alias, String standard) throws IOException
      Throws:
      IOException
    • countAvailable

      static int countAvailable()
    • getTagNumber

      private static int getTagNumber(String tagName)
    • findTaggedAliasListsOffset

      private static int findTaggedAliasListsOffset(String alias, String standard)
    • findTaggedConverterNum

      private static int findTaggedConverterNum(String alias, String standard)
    • isAliasInList

      private static boolean isAliasInList(String alias, int listOffset)
    • haveAvailableConverterList

      static boolean haveAvailableConverterList() throws IOException
      Throws:
      IOException
    • bld_countAvailableConverters

      static int bld_countAvailableConverters() throws IOException
      Throws:
      IOException
    • bld_getAvailableConverter

      static String bld_getAvailableConverter(int n) throws IOException
      Throws:
      IOException