|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.as400.access.NLS
public final class NLS
The NLS class contains a set of static methods that can be used to access various pieces of National Language Support information (such as language and country descriptions) on a system.
Method Summary | |
---|---|
static String |
ccsidToEncoding(int ccsid)
Returns a best-guess Java encoding given a CCSID. |
static int |
encodingToCCSID(String encoding)
Returns a best-guess CCSID given a Java encoding. |
static String |
getCountryDescription(AS400 system,
String countryID)
Retrieves the descriptive text for the specified country or region identifier. |
static String |
getLanguageDescription(AS400 system,
String languageID)
Retrieves the descriptive text for the specified language identifier. |
static boolean |
isForceJavaConversion()
Indicates whether or not any text conversion performed by the Toolbox uses the converter tables that are part of the Toolbox, or the converter tables that are part of the Java Runtime Environment. |
static int |
localeToCCSID(Locale locale)
Returns a best-guess CCSID given a Java Locale object. |
static int |
localeToCCSID(String localeString)
Returns a best-guess CCSID given a Java locale string. |
static String |
localeToNLV(Locale locale)
Returns a best-guess National Language Version (NLV) string given a Java Locale object. |
static String |
localeToNLV(String localeString)
Returns a best-guess National Language Version (NLV) string given a Java locale string. |
static void |
setForceJavaConversion(boolean forceJavaTables)
Sets whether or not any text conversion performed by the Toolbox uses the converter tables that are part of the Toolbox, or the converter tables that are part of the Java Runtime Environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String ccsidToEncoding(int ccsid)
ccsid
- The coded character set identifier (CCSID), e.g. 37.
encodingToCCSID(java.lang.String)
,
localeToCCSID(java.lang.String)
public static int encodingToCCSID(String encoding)
encoding
- The encoding, e.g. "Cp037".
ccsidToEncoding(int)
,
localeToCCSID(java.lang.String)
public static int localeToCCSID(String localeString)
localeString
- The locale string, e.g. "de_CH".
public static int localeToCCSID(Locale locale)
Locale.ENGLISH
)
will return the single-byte EBCDIC CCSID of 37.
locale
- The Locale object.
public static String localeToNLV(String localeString)
localeString
- The locale string, e.g. "de_CH".
public static String localeToNLV(Locale locale)
locale
- The Locale object.
public static String getCountryDescription(AS400 system, String countryID) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
system
- The system.countryID
- The country or region identifier.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException
getLanguageDescription(com.ibm.as400.access.AS400, java.lang.String)
public static String getLanguageDescription(AS400 system, String languageID) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
system
- The system.languageID
- The language identifier.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException
getCountryDescription(com.ibm.as400.access.AS400, java.lang.String)
public static boolean isForceJavaConversion()
setForceJavaConversion(boolean)
public static void setForceJavaConversion(boolean forceJavaTables)
The usefulness of this method is arbitrary. Typically, applications only need to force Java conversion if they are seeing inconsistent character conversion between an older release of the Toolbox and a newer one. Some problem characters include EBCDIC line feeds and a few characters in Katakana, such as the middle dot or bullet.
forceJavaTables
- Specify true if the Java Runtime Environement converter tables are used;
false if the Toolbox converter tables are used. The default is false.isForceJavaConversion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |