public class CCSID
extends java.lang.Object
This is basically now a wrapper for JmqiCodepage...
Note: Since all Java strings are Unicode, it is never possible to have a string in an alien codepage. The interactions supported by this class are always conversions between Java strings and byte arrays, which can contain data representing strings in any codepage.
Note: All operations are provided by static methods. No instance of CCSID can be created.
| Constructor and Description |
|---|
CCSID() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convert(byte[] bytes,
int ccsid)
Deprecated.
prefer
Charsets.convert(byte[],int) |
static java.lang.String |
convert(byte[] bytes,
int offset,
int length,
int ccsid)
Deprecated.
|
static byte[] |
convert(java.lang.String string,
int ccsid)
Deprecated.
prefer
Charsets.convert(String,int) |
static int |
getCCSID(java.lang.String codepage)
Returns the CCSID corresponding to the specified codepage.
|
static java.util.Enumeration |
getCCSIDs() |
static java.lang.String |
getCodepage(int ccsid)
Returns the codepage name corresponding to the specified CCSID.
|
static java.nio.charset.CharsetDecoder |
getDecoder(int ccsid)
Returns the Charset Decoder corresponding to the specified CCSID.
|
static java.nio.charset.CharsetEncoder |
getEncoder(int ccsid)
Returns the Charset Encoder corresponding to the specified CCSID.
|
static com.ibm.mq.jmqi.system.JmqiCodepage |
getJmqiCodepage(int ccsid)
Returns the JmqiCodepage corresponding to the specified CCSID.
|
public static com.ibm.mq.jmqi.system.JmqiCodepage getJmqiCodepage(int ccsid)
throws java.io.UnsupportedEncodingException
ccsid - the Coded Character Set Identifierjava.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSIDpublic static java.lang.String getCodepage(int ccsid)
throws java.io.UnsupportedEncodingException
ccsid - the Coded Character Set Identifier.java.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID valuepublic static int getCCSID(java.lang.String codepage)
throws java.io.UnsupportedEncodingException
codepage - a valid codepage.java.io.UnsupportedEncodingException - if there is no CCSID mapping for the supplied codepage.public static java.nio.charset.CharsetEncoder getEncoder(int ccsid)
throws java.io.UnsupportedEncodingException
ccsid - the Coded Character Set Identifier.java.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID valuepublic static java.nio.charset.CharsetDecoder getDecoder(int ccsid)
throws java.io.UnsupportedEncodingException
ccsid - the Coded Character Set Identifier.java.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID valuepublic static java.lang.String convert(byte[] bytes,
int ccsid)
throws java.io.UnsupportedEncodingException
Charsets.convert(byte[],int)bytes - the byte array to convert.ccsid - the Coded Character Set Identifier.java.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID value
or the platform cannot convert from the codepage.public static java.lang.String convert(byte[] bytes,
int offset,
int length,
int ccsid)
throws java.io.UnsupportedEncodingException
Charsets.convert(byte[],int,int,int)bytes - the byte array to convert.offset - the offset in the array at which to start convertinglength - the number of bytes to convertccsid - the Coded Character Set Identifier.java.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID value
or the platform cannot convert from the codepage.public static byte[] convert(java.lang.String string,
int ccsid)
throws java.io.UnsupportedEncodingException
Charsets.convert(String,int)ccsid - the Coded Character Set Identifier.string - the string to convertjava.io.UnsupportedEncodingException - if there is no codepage mapping for the supplied CCSID value
or the platform cannot convert from the codepage.public static java.util.Enumeration getCCSIDs()