|
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.EbcdicStringIterator
public class EbcdicStringIterator
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.
Constructor Summary | |
---|---|
EbcdicStringIterator(String unicodeString,
int ccsid,
boolean isPureDbcs)
Allow the given string to be split up into chunk based on EBCDIC byte lengths |
|
EbcdicStringIterator(String unicodeString,
int ccsid,
boolean isPureDbcs,
boolean wantShiftsEmbedded)
|
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 EbcdicStringIterator(String unicodeString, int ccsid, boolean isPureDbcs)
unicodeString
- - the string to be split uppublic EbcdicStringIterator(String unicodeString, int ccsid, boolean isPureDbcs, boolean wantShiftsEmbedded)
unicodeString
- - the string we should be iterating overccsid
- - what the CCSID of the encoding isisPureDbcs
- - whether this is pure DBCS that does not have bracketing shiftswantShiftsEmbedded
- - whether 0x1e and 0x1f bracketing characters should be embedded in DBCSMethod Detail |
---|
public IEbcdicString getNextEbcdicBytes(int ebcdicByteLength)
IEbcdicStringIterator
getNextEbcdicBytes
in interface IEbcdicStringIterator
ebcdicByteLength
- - the desired length
public int getRemainingLength()
IEbcdicStringIterator
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 |