com.ibm.text
Class UScript
java.lang.Object
|
+--com.ibm.text.UScript
- public final class UScript
- extends java.lang.Object
A class to reflect UTR #24: Script Names
(based on ISO 15924:2000, "Code for the representation of names of
scripts".) UTR #24 describes the basis for a new Unicode data file,
Scripts.txt.
Method Summary |
static int[] |
getCode(java.util.Locale locale)
Gets a script codes associated with the given locale or ISO 15924 abbreviation or name. |
static int[] |
getCode(java.lang.String nameOrAbbrOrLocale)
Gets a script codes associated with the given locale or ISO 15924 abbreviation or name. |
static java.lang.String |
getName(int scriptCode)
Gets a script name associated with the given script code. |
static int |
getScript(int codepoint)
Gets the script code associated with the given codepoint. |
static java.lang.String |
getShortName(int scriptCode)
Gets a script name associated with the given script code. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INVALID_CODE
public static final int INVALID_CODE
COMMON
public static final int COMMON
INHERITED
public static final int INHERITED
ARABIC
public static final int ARABIC
ARMENIAN
public static final int ARMENIAN
BENGALI
public static final int BENGALI
BOPOMOFO
public static final int BOPOMOFO
CHEROKEE
public static final int CHEROKEE
COPTIC
public static final int COPTIC
CYRILLIC
public static final int CYRILLIC
DESERET
public static final int DESERET
DEVANAGARI
public static final int DEVANAGARI
ETHIOPIC
public static final int ETHIOPIC
GEORGIAN
public static final int GEORGIAN
GOTHIC
public static final int GOTHIC
GREEK
public static final int GREEK
GUJARATI
public static final int GUJARATI
GURMUKHI
public static final int GURMUKHI
HAN
public static final int HAN
HANGUL
public static final int HANGUL
HEBREW
public static final int HEBREW
HIRAGANA
public static final int HIRAGANA
KANNADA
public static final int KANNADA
KATAKANA
public static final int KATAKANA
KHMER
public static final int KHMER
LAO
public static final int LAO
LATIN
public static final int LATIN
MALAYALAM
public static final int MALAYALAM
MONGOLIAN
public static final int MONGOLIAN
MYANMAR
public static final int MYANMAR
OGHAM
public static final int OGHAM
OLD_ITALIC
public static final int OLD_ITALIC
ORIYA
public static final int ORIYA
RUNIC
public static final int RUNIC
SINHALA
public static final int SINHALA
SYRIAC
public static final int SYRIAC
TAMIL
public static final int TAMIL
TELUGU
public static final int TELUGU
THAANA
public static final int THAANA
THAI
public static final int THAI
TIBETAN
public static final int TIBETAN
UCAS
public static final int UCAS
YI
public static final int YI
CODE_LIMIT
public static final int CODE_LIMIT
UScript
public UScript()
getCode
public static final int[] getCode(java.util.Locale locale)
throws java.util.MissingResourceException
- Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.
Returns MALAYAM given "Malayam" OR "Mlym".
Returns LATIN given "en" OR "en_US"
- Parameters:
locale
- Locale- Returns:
- The script codes array. null if the the code cannot be found.
- Throws:
java.util.MissingResourceException
-
getCode
public static final int[] getCode(java.lang.String nameOrAbbrOrLocale)
- Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.
Returns MALAYAM given "Malayam" OR "Mlym".
Returns LATIN given "en" OR "en_US"
- Parameters:
nameOrAbbrOrLocale
- name of the script or ISO 15924 code or locale- Returns:
- The script codes array. null if the the code cannot be found.
getScript
public static final int getScript(int codepoint)
- Gets the script code associated with the given codepoint.
Returns UScript.MALAYAM given 0x0D02
- Parameters:
codepoint
- UChar32 codepointerr
- the error status code.- Returns:
- The script code
- Throws:
java.lang.IllegalArgumentException
-
getName
public static final java.lang.String getName(int scriptCode)
- Gets a script name associated with the given script code.
Returns "Malayam" given MALAYAM
- Parameters:
scriptCode
- int script code- Returns:
- script name as a string in full as given in TR#24
- Throws:
java.lang.IllegalArgumentException
-
getShortName
public static final java.lang.String getShortName(int scriptCode)
- Gets a script name associated with the given script code.
Returns "Mlym" given MALAYAM
- Parameters:
scriptCode
- int script code- Returns:
- script abbreviated name as a string as given in TR#24
- Throws:
java.lang.IllegalArgumentException
-
Copyright (c) 2001 IBM Corporation and others.