|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.as400.access.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 an OS/400 server.
| Method Summary | |
static java.lang.String |
ccsidToEncoding(int ccsid)
Returns a best-guess Java encoding given a CCSID. |
static int |
encodingToCCSID(java.lang.String encoding)
Returns a best-guess CCSID given a Java encoding. |
static java.lang.String |
getCountryDescription(AS400 system,
java.lang.String countryID)
Retrieves the descriptive text for the specified country or region identifier. |
static java.lang.String |
getLanguageDescription(AS400 system,
java.lang.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(java.util.Locale locale)
Returns a best-guess CCSID given a Java Locale object. |
static int |
localeToCCSID(java.lang.String localeString)
Returns a best-guess CCSID given a Java locale string. |
static java.lang.String |
localeToNLV(java.util.Locale locale)
Returns a best-guess National Language Version (NLV) string given a Java Locale object. |
static java.lang.String |
localeToNLV(java.lang.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 java.lang.String ccsidToEncoding(int ccsid)
encodingToCCSID(java.lang.String),
localeToCCSID(java.lang.String)public static int encodingToCCSID(java.lang.String encoding)
ccsidToEncoding(int),
localeToCCSID(java.lang.String)public static int localeToCCSID(java.lang.String localeString)
public static int localeToCCSID(java.util.Locale locale)
Locale.ENGLISH)
will return the single-byte EBCDIC CCSID of 37.
public static java.lang.String localeToNLV(java.lang.String localeString)
public static java.lang.String localeToNLV(java.util.Locale locale)
public static java.lang.String getCountryDescription(AS400 system,
java.lang.String countryID)
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
system - The OS/400 server.countryID - The country or region identifier.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistExceptiongetLanguageDescription(com.ibm.as400.access.AS400, java.lang.String)
public static java.lang.String getLanguageDescription(AS400 system,
java.lang.String languageID)
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
system - The OS/400 server.languageID - The language identifier.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistExceptiongetCountryDescription(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 | |||||||||