org.openorb.orb.iiop
Class CodeSetDatabase

java.lang.Object
  |
  +--org.openorb.orb.iiop.CodeSetDatabase

public class CodeSetDatabase
extends java.lang.Object

This class has been automatically generated on Tue Apr 09 00:07:52 CEST 2002. Use 'java org.openorb.iiop.CodeSetDatabaseInitializer src/main/org/openorb/iiop/cs_registry1_2h.txt' * to generate it. DO NOT MODIFY MANUALLY !!!

Author:
The CodeSetDatabaseInitializer tool.

Constructor Summary
CodeSetDatabase()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeSetDatabase

public CodeSetDatabase()
Method Detail

canonicalize

public static java.lang.String canonicalize(java.lang.String encoding)
                                     throws java.io.UnsupportedEncodingException
Convert an encoding name into it's canonical Java name.

populateNameToIdMap

public static void populateNameToIdMap(java.util.HashMap map)
Populates the map between canonical codeset names and an ArrayList of codeset ids.

getCodeSetFromId

public static CodeSet getCodeSetFromId(int id)
Return a CodeSet object for an OSF registry codeset id.
Parameters:
id - An OSF charset and codeset registry id.
Returns:
A CodeSet object.

getAlignmentFromId

public static int getAlignmentFromId(int id)
Return the alignment for an OSF registry codeset id. This method replaces the method CodeSet.getAlignmentFromId() and moves the functionality to the time when the class CodeSetDatabase is created from the OSF charset and codeset registry file.
Parameters:
id - An OSF charset and codeset registry id.
Returns:
The aligment for the specified codeset
  • -1When the codeset id doesn't exist or the maximum size is 1, i.e. the codeset is a byte-oriented single-byte codeset
  • 0 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)

getNameFromId

public static java.lang.String getNameFromId(int id)
Returns the name of a OSF charset and codeset registry entry.
Parameters:
id - An OSF charset and codeset registry id.
Returns:
The name of the codeset.

getCanonicalNameFromId

public static java.lang.String getCanonicalNameFromId(int id)
Returns the canonical Java name of a OSF charset and codeset registry entry.
Parameters:
id - An OSF charset and codeset registry id.
Returns:
The name of the codeset.

getDescriptionFromId

public static java.lang.String getDescriptionFromId(int id)
Returns the description of a OSF charset and codeset registry entry.
Parameters:
id - An OSF charset and codeset registry id.
Returns:
The OSF description of the codeset.

getCodeSetsFromCharset

public static int[] getCodeSetsFromCharset(short charset)
Return an array of CodeSet objects that support the specified charset.
Parameters:
charset - An OSF charset registry id.
Returns:
An array of codeset ids supporting the charset.