|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.idms.io.TraceObject ca.idms.io.NativeCodePage
public class NativeCodePage
This class supports the Country Extended Code Table feature. The IDMS and Datacom ODBC drivers use code tables created by the CECP editor for conversion between ASCII and EBCDIC. Normally the Native data conversion classes in this package use the built in Java CharToByte and ByteToChar converter classes, which support an extensive set of character encodings. This class can be used for simple conversion when the JRE on the client machine does not have the full set of converter classes. The table is created on Windows using the IDMS Server Code Page Editor application, and read in binary format on all platforms, including z/OS. All character fields are expected to be in ASCII.
Field Summary | |
---|---|
static boolean |
debug
Use CECP instead of Java converter class. |
static java.lang.String |
DEBUG
Property key to enable debug. |
static boolean |
network
Try to use CECP before the server specified network encoding. |
static java.lang.String |
NETWORK
Property key to enable use for network encoding. |
Fields inherited from class ca.idms.io.TraceObject |
---|
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE |
Constructor Summary | |
---|---|
NativeCodePage(java.lang.String s)
Creates a new code page object from a table file in the classpath. |
Method Summary | |
---|---|
byte[] |
getBytes(java.lang.String s)
Convert a string to EBCDIC bytes. |
java.lang.String |
getString(byte[] b)
Convert EBCDIC bytes to a string. |
java.lang.String |
getString(byte[] b,
int o,
int l)
Convert EBCDIC bytes to a string. |
Methods inherited from class ca.idms.io.TraceObject |
---|
finalize, get, getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEBUG
public static final java.lang.String NETWORK
public static boolean debug
DEBUG
public static boolean network
NETWORK
Constructor Detail |
---|
public NativeCodePage(java.lang.String s)
s
- the file name containing the code pages.Method Detail |
---|
public byte[] getBytes(java.lang.String s) throws java.io.UnsupportedEncodingException
s
- string assumed to be just ASCII
java.io.UnsupportedEncodingException
- if the table was not loaded
or not a single byte characterpublic java.lang.String getString(byte[] b) throws java.io.UnsupportedEncodingException
b
- array of EBCDIC bytes
java.io.UnsupportedEncodingException
- if the table was not loadedpublic java.lang.String getString(byte[] b, int o, int l) throws java.io.UnsupportedEncodingException
b
- array of EBCDIC byteso
- start offset in arrayl
- length to convert
java.io.UnsupportedEncodingException
- if the table was not loaded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |