|
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.WrappedEbcdicStringIterator
public class WrappedEbcdicStringIterator
This class allows you to split up a Unicode string into pieces of arbitrary lengths that are specified in EBCDIC byte lengths
Example
Take the following example where uppercase is Chinese and lower case is English
aBCd
in EBCDIC is [B1B2C1C2]d
If we are wrapping this field on a 24x80 screen and the field begins at 75, we have room for
6 bytes on the first line. The first 5 bytes are a [B1B2
but this would not
be valid without a closing shift. So we really want a
(note the need
to pad) and put the B1B1C1C2]d
on the next line.
If we would have used simple substring we would have gotten a [B1B2]
and
[C1C2]d
which would have been wrong.
Nested Class Summary | |
---|---|
static class |
WrappedEbcdicStringIterator.WrappedEbcdicString
Instance holding a string that corresponds to EBCDIC DBCS that is being truncated, one segment at a time. |
static class |
WrappedEbcdicStringIterator.WrappedEbcdicStringResult
|
Constructor Summary | |
---|---|
WrappedEbcdicStringIterator(String unicodeString,
int ccsid,
boolean isPureDbcs)
Allow the given string to be split up into chunk based on EBCDIC byte lengths |
Method Summary | |
---|---|
IEbcdicString |
getNextEbcdicBytes(int ebcdicByteLength)
Return the String that corresponds to the next ebcdicByteLength number of EBCDIC bytes of the string iterated on by this class. |
int |
getRemainingLength()
Return the EBCDIC byte length of the remainder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WrappedEbcdicStringIterator(String unicodeString, int ccsid, boolean isPureDbcs)
unicodeString
- - the string to be split upMethod Detail |
---|
public IEbcdicString getNextEbcdicBytes(int ebcdicByteLength)
getNextEbcdicBytes
in interface IEbcdicStringIterator
ebcdicByteLength
- - the desired length, in EBCDIC bytes, of the resultant string.
public int getRemainingLength()
getRemainingLength
in interface IEbcdicStringIterator
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |