public class CodeSetDatabase
extends java.lang.Object
| Constructor and Description |
|---|
CodeSetDatabase() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
canonicalize(java.lang.String encoding)
Convert an encoding name into it's canonical Java name.
|
static int |
getAlignmentFromId(int id)
Return the alignment for an OSF registry codeset id.
|
static java.lang.String |
getCanonicalNameFromId(int id)
Returns the canonical Java name of a OSF charset
and codeset registry entry.
|
static CodeSet |
getCodeSetFromId(int id)
Return a CodeSet object for an OSF registry codeset id.
|
static int[] |
getCodeSetsFromCharset(short charset)
Return an array of CodeSet objects that support the
specified charset.
|
static java.lang.String |
getDescriptionFromId(int id)
Returns the description of a OSF charset and codeset
registry entry.
|
static java.lang.String |
getNameFromId(int id)
Returns the name of a OSF charset and codeset registry entry.
|
static void |
populateNameToIdMap(java.util.HashMap map)
Populates the map between canonical codeset names
and an ArrayList of codeset ids.
|
public static java.lang.String canonicalize(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic static void populateNameToIdMap(java.util.HashMap map)
public static CodeSet getCodeSetFromId(int id)
id - An OSF charset and codeset registry id.public static int getAlignmentFromId(int id)
id - An OSF charset and codeset registry id.-1When the codeset id doesn't exist or the
maximum size is 1, i.e.
the codeset is a byte-oriented single-byte codeset0 When it is a byte-oriented multi-byte
codeset>= 1 When it is a fixed-length
non-byte-oriented codeset (e.g. 2 for UCS codesets)public static java.lang.String getNameFromId(int id)
id - An OSF charset and codeset registry id.public static java.lang.String getCanonicalNameFromId(int id)
id - An OSF charset and codeset registry id.public static java.lang.String getDescriptionFromId(int id)
id - An OSF charset and codeset registry id.public static int[] getCodeSetsFromCharset(short charset)
charset - An OSF charset registry id.