bea.jolt
Class MBEncoding
java.lang.Object
bea.jolt.MBEncoding
- public final class MBEncoding
- extends java.lang.Object
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 (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
Jolt application which uses the MBSTRING data need to setup the
appropriate mapping information between Java and Tuxedo encoding name.
In addition, the Tuxedo encoding name to which the MBSTRING data is
converted when it is sent to the Tuxedo server can be specified.
Method Summary |
static java.lang.String |
checkMBEncoding(java.lang.String tuxedoEncoding)
Check if
the specified Tuxedo encoding name is valid. |
static java.lang.String |
getMBEncoding()
Get the
Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo
server is converted. |
static java.lang.String |
mapJavaToTuxedo(java.lang.String javaEncoding)
Map the
Java encoding name to the corresponding Tuxedo encoding name. |
static java.lang.String |
mapTuxedoToJava(java.lang.String tuxedoEncoding)
Map the
Tuxedo encoding name to the corresponding Java encoding name. |
static void |
setMBEncoding(java.lang.String tuxedoEncoding)
Set the
Tuxedo encoding name to which the MBSTRING data sent to the Tuxedo
server is converted. |
static void |
setMBEncodingMapFile(java.lang.String mapFile)
Set the map
file path used for mapping between Java and Tuxedo encoding name. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
MBEncoding
public MBEncoding()
setMBEncodingMapFile
public static void setMBEncodingMapFile(java.lang.String mapFile)
- Set the map file path used for mapping between Java and Tuxedo
encoding name. The map file path set by this method overrides the map
file path specified by the beaj.jolt.mbencodingmap system property. The
default map file path is "mbencmap" file in the current directory of
the Jolt application.
-
- Parameters:
mapFile
- The map file path.
mapTuxedoToJava
public static java.lang.String mapTuxedoToJava(java.lang.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.
mapJavaToTuxedo
public static java.lang.String mapJavaToTuxedo(java.lang.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.
setMBEncoding
public static void setMBEncoding(java.lang.String tuxedoEncoding)
- Set the 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 beaj.jolt.mbencoding
system property.
-
- Parameters:
tuxedoEncoding
- The Tuxedo encoding name used
for MBSTRING conversion.
getMBEncoding
public static java.lang.String getMBEncoding()
- Get the Tuxedo encoding name to which the MBSTRING data sent to
the Tuxedo server is converted. This encoding name is set by the
beaj.jolt.mbencoding system propertyset or the setMBEncoding method. If
the Tuxedo encoding name is not specified by the system property nor
the setMBEncoding method, the default charset name of Java is mapped to
the Tuxedo encoding name and used.
-
- Returns:
- The Tuxedo encoding name used for MBSTRING conversion.
checkMBEncoding
public static java.lang.String checkMBEncoding(java.lang.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.