BEA Systems, Inc.

BEA WebLogic Server 9.0 API Reference


weblogic.wtc.jatmi
Class MBEncoding

java.lang.Object
  extended byweblogic.wtc.jatmi.MBEncoding
All Implemented Interfaces:
Serializable

public final class MBEncoding
extends Object
implements Serializable

This class provides the utilities for handling the encoding name for MBSTRING data. Since the encoding names for the same character set often differ between Java and Tuxedo(GNU iconv), the encoding name mapping between Java and Tuxedo is necessary when a MBSTRING data is sent to or received from the Tuxedo server. With the methods of this class, the WTC application which uses the MBSTRING data need to setup the appropriate mapping information between Java and Tuxedo encoding name. In addition, the default Tuxedo encoding name to which the MBSTRING data is converted when it is sent to the Tuxedo server can be specified.

See Also:
Serialized Form
Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
MBEncoding()
           
 
Method Summary
static String checkMBEncoding(String tuxedoEncoding)
          Check if the specified Tuxedo encoding name is valid.
static String getDefaultMBEncoding()
          Get the default Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo server is converted.
static String mapJavaToTuxedo(String javaEncoding)
          Map the Java encoding name to the corresponding Tuxedo encoding name.
static String mapTuxedoToJava(String tuxedoEncoding)
          Map the Tuxedo encoding name to the corresponding Java encoding name.
static void setDefaultMBEncoding(String tuxedoEncoding)
          Set the default Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo server is converted.
static void setMBEncodingMapFile(String mapfile)
          Set the map file path used for mapping between Java and Tuxedo encoding name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBEncoding

public MBEncoding()
Method Detail

checkMBEncoding

public static String checkMBEncoding(String tuxedoEncoding)
Check if the specified Tuxedo encoding name is valid. If it is valid, the Tuxedo encoding name itself is returned. If it is invalid, null is returned.

Parameters:
tuxedoEncoding - The Tuxedo encoding name checked for validation.
Returns:
The Tuxedo encoding name if it is valid. Null if it is invalid.

getDefaultMBEncoding

public static String getDefaultMBEncoding()
Get the default Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo server is converted. This encoding name is set by the weblogic.wtc.mbencoding system propertyset or the setDefaultMBEncoding method. If the Tuxedo encoding name is not specified by the system property nor the setDefaultMBEncoding method, the default charset name of Java is mapped to the Tuxedo encoding name and used.

Returns:
The default Tuxedo encoding name used for MBSTRING conversion.

mapJavaToTuxedo

public static String mapJavaToTuxedo(String javaEncoding)
Map the Java encoding name to the corresponding Tuxedo encoding name. If mapping for the specified Java encoding name is not defined, the Java encoding name itself is returned.

Parameters:
javaEncoding - The Java encoding name.
Returns:
The corresponding Tuxedo encoding name.

mapTuxedoToJava

public static String mapTuxedoToJava(String tuxedoEncoding)
Map the Tuxedo encoding name to the corresponding Java encoding name. If mapping for the specified Tuxedo encoding name is not defined, the Tuxedo encoding name itself is returned.

Parameters:
tuxedoEncoding - The Tuxedo encoding name.
Returns:
The corresponding Java encoding name.

setDefaultMBEncoding

public static void setDefaultMBEncoding(String tuxedoEncoding)
Set the default Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo server is converted. The encoding name set by this method overrides the encoding name specified by the weblogic.wtc.mbencoding system property.

Parameters:
tuxedoEncoding - The default Tuxedo encoding name used for MBSTRING conversion.

setMBEncodingMapFile

public static void setMBEncodingMapFile(String mapfile)
Set the map file path used for mapping between Java and Tuxedo encoding name. The mapfile path set by this method overrides the mapfile path specified by the weblogic.wtc.mbencodingmap system property. The default map file path is "WL_HOME/server/lib/mbencmap".


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.