|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.iso.BCDInterpreter
public class BCDInterpreter
Implements BCD Interpreter. Numeric Strings (consisting of chars '0'..'9' are converted to and from BCD bytes. Thus, "1234" is converted into 2 bytes: 0x12, 0x34.
| Field Summary | |
|---|---|
static BCDInterpreter |
LEFT_PADDED
This BCDInterpreter sometimes adds a 0-nibble to the left. |
static BCDInterpreter |
LEFT_PADDED_F
This BCDInterpreter sometimes adds a F-nibble to the left. |
static BCDInterpreter |
RIGHT_PADDED
This BCDInterpreter sometimes adds a 0-nibble to the right. |
static BCDInterpreter |
RIGHT_PADDED_F
This BCDInterpreter sometimes adds a F-nibble to the right. |
| Method Summary | |
|---|---|
int |
getPackedLength(int nDataUnits)
Each numeric digit is packed into a nibble, so 2 digits per byte, plus the possibility of padding. |
void |
interpret(String data,
byte[] b,
int offset)
(non-Javadoc) |
String |
uninterpret(byte[] rawData,
int offset,
int length)
(non-Javadoc) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final BCDInterpreter LEFT_PADDED
public static final BCDInterpreter RIGHT_PADDED
public static final BCDInterpreter RIGHT_PADDED_F
public static final BCDInterpreter LEFT_PADDED_F
| Method Detail |
|---|
public void interpret(String data,
byte[] b,
int offset)
interpret in interface Interpreterdata - The data to be interpreted.org.jpos.iso.Interpreter#interpret(java.lang.String)
public String uninterpret(byte[] rawData,
int offset,
int length)
uninterpret in interface InterpreterrawData - The interpreted data.offset - The index in rawData to start interpreting at.length - The number of data units to interpret.
org.jpos.iso.Interpreter#uninterpret(byte[])public int getPackedLength(int nDataUnits)
getPackedLength in interface InterpreterInterpreter.getPackedLength(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||