Package com.ibm.icu.charset
Class UConverterAlias
java.lang.Object
com.ibm.icu.charset.UConverterAlias
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
(package private) static final int
(package private) static final byte[]
private static final String
(package private) static final int
(package private) static final int
private static final int
(package private) static ByteBuffer
(package private) static char[]
(package private) static int
(package private) static String[]
(package private) static char[]
(package private) static String
(package private) static byte[]
(package private) static char[]
(package private) static byte[]
(package private) static char[]
(package private) static char[]
(package private) static char[]
(package private) static char[]
private static final byte
(package private) static final byte
private static final int
private static final byte
private static final int
(package private) static final int
(package private) static final int
private static final int
private static final int
(package private) static final int
private static final int
private static final int
private static final int
private static final int
(package private) static final int
(package private) static final int
private static final int
private static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static int
(package private) static String
bld_getAvailableConverter
(int n) (package private) static int
compareNames
(String name1, String name2) Do a fuzzy compare of a two converter/alias names.(package private) static int
countAliases
(String alias) (package private) static int
private static final String
extractString
(byte[] sArray, int sBegin) private static final int
findConverter
(String alias, boolean[] isAmbigous) private static int
findTaggedAliasListsOffset
(String alias, String standard) private static int
findTaggedConverterNum
(String alias, String standard) private static final char
GET_CHAR_TYPE
(char c) private static final String
GET_NORMALIZED_STRING
(int idx) private static final String
GET_STRING
(int idx) (package private) static String
(package private) static String
getAvailableName
(int n) (package private) static String
getCanonicalName
(String alias, String standard) (package private) static final String
getStandardName
(String alias, String standard) private static int
getTagNumber
(String tagName) private static final boolean
(package private) static boolean
(package private) static int
io_countAliases
(String alias) (package private) static String
io_getAlias
(String alias, int n) Return the number of all aliases (and converter names).private static final StringBuilder
io_stripASCIIForCompare
(StringBuilder dst, String name) private static final boolean
private static boolean
isAliasInList
(String alias, int listOffset) 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.private static final int
strlen
(byte[] sArray, int sBegin)
-
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
-
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
-
gAvailableConverterCount
static int gAvailableConverterCount -
gDefaultConverterName
-
-
Constructor Details
-
UConverterAlias
UConverterAlias()
-
-
Method Details
-
GET_STRING
-
GET_NORMALIZED_STRING
-
extractString
-
strlen
private static final int strlen(byte[] sArray, int sBegin) -
isAlias
-
haveAliasData
- Throws:
IOException
-
findConverter
-
stripForCompare
stripForCompare Remove the underscores, dashes and spaces from the name, and convert the name to lower case.- Parameters:
dst
- The destination buffer, which is <= 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
-
compareNames
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-terminatedname2
- 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
- Throws:
IOException
-
io_getAlias
Return the number of all aliases (and converter names).- Returns:
- the number of all aliases
- Throws:
IOException
-
getStandardName
- Throws:
IOException
-
countAliases
- Throws:
IOException
-
getAlias
- Throws:
IOException
-
getAvailableName
-
getCanonicalName
- Throws:
IOException
-
countAvailable
static int countAvailable() -
getTagNumber
-
findTaggedAliasListsOffset
-
findTaggedConverterNum
-
isAliasInList
-
haveAvailableConverterList
- Throws:
IOException
-
bld_countAvailableConverters
- Throws:
IOException
-
bld_getAvailableConverter
- Throws:
IOException
-