|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.util.ISeriesCodepageConverter
public class ISeriesCodepageConverter
Clients should not instantiate this class
Field Summary | |
---|---|
static int |
CCSID_ISO88591
|
static int |
CCSID_NO_CONVERSION
|
static int |
CCSID_UTF8
|
static String |
Copyright
|
static byte |
EBCDIC_SPACE
|
static String |
ENCODING_UTF8
|
static byte |
SHIFT_IN
|
static byte |
SHIFT_OUT
|
Constructor Summary | |
---|---|
ISeriesCodepageConverter(AS400 as400)
Constructor for ISeriesCodepageConverter |
|
ISeriesCodepageConverter(AS400 as400,
boolean leaveVisual)
Create a code page converter which will optionally convert to logical or not as specified if the CCSID is bidirectional. |
|
ISeriesCodepageConverter(int ccsid,
AS400 as400)
Constructor for ISeriesCodepageConverter |
|
ISeriesCodepageConverter(int ccsid,
AS400 as400,
boolean leaveVisual)
Create a code page converter which will optionally convert to logical or not as specified if the CCSID is bidirectional. |
Method Summary | |
---|---|
byte[] |
convClientBytesToHostBytes(byte[] source,
int offset,
int length)
Deprecated. this method only works if the CCSID is supported on the locale, its recommended to use either: convClientBytesToHostBytesUTF8(byte[] source, int offset, int length) or convClientBytesToHostBytes(byte[] source, int offset, int length, String encoding) |
byte[] |
convClientBytesToHostBytes(byte[] source,
int offset,
int length,
String encoding)
Converts the specified source byte array into the destination byte array. |
byte[] |
convClientBytesToHostBytes(int targetCCSID,
byte[] source)
Converts the specified source byte array into the destination byte array. |
byte[] |
convClientBytesToHostBytes(int targetCCSID,
byte[] source,
String encoding)
Converts the specified source byte array into the destination byte array. |
byte[] |
convClientBytesToHostBytesUTF8(byte[] source,
int offset,
int length)
Converts the specified source byte array into the destination byte array. |
byte[] |
convClientBytesToHostBytesUTF8(int targetCCSID,
byte[] source)
Converts the specified source byte array into the destination byte array. |
byte[] |
convClientStringToHostBytes(int targetCCSID,
String source)
Converts the specified Java source string into a byte array. |
static byte[] |
convertContiguousShiftInShiftOutToSpaces(byte[] input)
Scan the input byte array and convert any sequence of SHIFT IN (0x0F) immediately followed by a SHIFT OUT (0x0E) to two spaces (0x40 0x40). |
static String |
convertHostBytesToClientString(byte[] ebcdicBytes,
int offset,
int textLength,
AS400 as400)
Convert from host bytes to Java String If bidi, uses proper transform to create smart logical format with directional marks |
byte[] |
convHostBytesToClientBytes(byte[] source,
int offset,
int length)
Converts the specified source byte array from the host into a destination byte array. |
byte[] |
convHostBytesToClientBytes(byte[] source,
int offset,
int length,
String encoding)
Converts the specified source byte array into a destination byte array. |
byte[] |
convHostBytesToClientBytes(int sourceCCSID,
byte[] source)
Deprecated. this will only work if the local encoding supports this CCSID, use convHostBytesToClientBytes(int sourceCCSID, byte[] source, String encoding) or convHostBytesToClientBytesUTF8(int sourceCCSID, byte[] source) |
byte[] |
convHostBytesToClientBytes(int sourceCCSID,
byte[] source,
String encoding)
Converts the specified source byte array into a destination byte array. |
byte[] |
convHostBytesToClientBytesUTF8(byte[] source,
int offset,
int length)
Converts the specified source byte array from the host into a destination byte array. |
byte[] |
convHostBytesToClientBytesUTF8(int sourceCCSID,
byte[] source)
Converts the specified source byte array from the host into a destination byte array. |
String |
convHostBytesToClientString(byte[] source,
int offset,
int length)
Converts the specified bytes into a Java string. |
String |
convHostBytesToClientString(int sourceCCSID,
byte[] source)
Converts the specified bytes into a Java string. |
AS400 |
getAS400Object()
Returns the AS400 object |
static String |
getEncoding(int ccsidVal)
Returns the encoding given the CCSID |
void |
setAS400Object(AS400 as400)
Set the AS400 object |
String |
xlateNameToHostEquiv(String name)
Updates all special characters (including variant) in the string to return the equivalent name on the server. |
String |
xlateNameToVisualEquiv(String equivNameOnServer)
Gets the visual equivalent of the name given the server equivalent of that name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final int CCSID_NO_CONVERSION
public static final byte SHIFT_IN
public static final byte SHIFT_OUT
public static final byte EBCDIC_SPACE
public static final int CCSID_UTF8
public static final String ENCODING_UTF8
public static final int CCSID_ISO88591
Constructor Detail |
---|
public ISeriesCodepageConverter(AS400 as400)
public ISeriesCodepageConverter(AS400 as400, boolean leaveVisual)
as400
- The iSeries to connect toleaveVisual
- true if you don't want to convert to logical, false if you want to
convert from visual to logical and back.public ISeriesCodepageConverter(int ccsid, AS400 as400, boolean leaveVisual) throws UnsupportedEncodingException
ccsid
- The CCSID to user for conversionas400
- The iSeries to connect toleaveVisual
- true if you don't want to convert to logical, false if you want to
convert from visual to logical and back.
UnsupportedEncodingException
- Thrown when the CCSID is not supported on the specified iSeries.public ISeriesCodepageConverter(int ccsid, AS400 as400) throws UnsupportedEncodingException
UnsupportedEncodingException
Method Detail |
---|
public AS400 getAS400Object()
public void setAS400Object(AS400 as400)
public String convHostBytesToClientString(int sourceCCSID, byte[] source) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytes
UnsupportedEncodingException
public String convHostBytesToClientString(byte[] source, int offset, int length)
the
- source bytesthe
- offset in the byte arraythe
- number of bytes of the array to convert starting at the offset
public byte[] convHostBytesToClientBytes(int sourceCCSID, byte[] source) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytes
UnsupportedEncodingException
public byte[] convHostBytesToClientBytes(byte[] source, int offset, int length) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytesthe
- offset in the byte arraythe
- number of bytes of the array to convert starting at the offset
UnsupportedEncodingException
public byte[] convHostBytesToClientBytesUTF8(int sourceCCSID, byte[] source) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytes
UnsupportedEncodingException
public byte[] convHostBytesToClientBytesUTF8(byte[] source, int offset, int length) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytesthe
- offset in the byte arraythe
- number of bytes of the array to convert starting at the offset
UnsupportedEncodingException
public byte[] convHostBytesToClientBytes(int sourceCCSID, byte[] source, String encoding) throws UnsupportedEncodingException
the
- source CCSIDthe
- source bytesthe
- encoding to be used for the target bytes
UnsupportedEncodingException
public byte[] convHostBytesToClientBytes(byte[] source, int offset, int length, String encoding) throws UnsupportedEncodingException
the
- source bytesthe
- offset in the byte arraythe
- number of bytes of the array to convert starting at the offsetthe
- encoding to be used for the target bytes
UnsupportedEncodingException
public byte[] convClientStringToHostBytes(int targetCCSID, String source) throws UnsupportedEncodingException
the
- target CCSIDthe
- source string
UnsupportedEncodingException
public byte[] convClientBytesToHostBytes(int targetCCSID, byte[] source) throws UnsupportedEncodingException
the
- target CCSIDthe
- source bytes
UnsupportedEncodingException
public byte[] convClientBytesToHostBytes(byte[] source, int offset, int length) throws UnsupportedEncodingException
the
- source bytesthe
- offset of the byte arraythe
- number of bytes to convert from the byte array starting at the offset
UnsupportedEncodingException
public byte[] convClientBytesToHostBytesUTF8(int targetCCSID, byte[] source) throws UnsupportedEncodingException
the
- target CCSIDthe
- source bytes
UnsupportedEncodingException
public byte[] convClientBytesToHostBytesUTF8(byte[] source, int offset, int length) throws UnsupportedEncodingException
the
- source bytesthe
- offset in the byte arraythe
- number of bytes to convert from the source array starting at the offset
UnsupportedEncodingException
public byte[] convClientBytesToHostBytes(int targetCCSID, byte[] source, String encoding) throws UnsupportedEncodingException
the
- target CCSIDthe
- source bytesthe
- encoding to be used to read in the source bytes
UnsupportedEncodingException
public byte[] convClientBytesToHostBytes(byte[] source, int offset, int length, String encoding) throws UnsupportedEncodingException
the
- source bytesthe
- offset in the byte arraythe
- number of bytes to convert from the source array starting at the offsetthe
- encoding to be used to read in the source bytes
UnsupportedEncodingException
public String xlateNameToHostEquiv(String name) throws UnsupportedEncodingException
the
- name
UnsupportedEncodingException
public String xlateNameToVisualEquiv(String equivNameOnServer) throws UnsupportedEncodingException
the
- host equivalent name
UnsupportedEncodingException
public static String getEncoding(int ccsidVal) throws UnsupportedEncodingException
UnsupportedEncodingException
public static byte[] convertContiguousShiftInShiftOutToSpaces(byte[] input)
public static String convertHostBytesToClientString(byte[] ebcdicBytes, int offset, int textLength, AS400 as400)
ebcdicBytes
- - array of EBCDIC host dataoffset
- - offset into host arraytextLength
- - number of bytes to convertas400
- - toolbox reference to host
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |