public class HEXInterpreter extends java.lang.Object implements Interpreter
Modifier and Type | Field and Description |
---|---|
static HEXInterpreter |
LEFT_PADDED
This HEXInterpreter sometimes adds a 0-nibble to the left.
|
static HEXInterpreter |
LEFT_PADDED_F
This HEXInterpreter sometimes adds a F-nibble to the left.
|
static HEXInterpreter |
RIGHT_PADDED
This HEXInterpreter sometimes adds a 0-nibble to the right.
|
static HEXInterpreter |
RIGHT_PADDED_F
This HEXInterpreter sometimes adds a F-nibble to the right.
|
Modifier and Type | Method and Description |
---|---|
int |
getPackedLength(int nDataUnits)
Each numeric digit is packed into a nibble, so 2 digits per byte, plus the
possibility of padding.
|
void |
interpret(java.lang.String data,
byte[] b,
int offset)
(non-Javadoc)
|
java.lang.String |
uninterpret(byte[] rawData,
int offset,
int length)
(non-Javadoc)
|
public static final HEXInterpreter LEFT_PADDED
public static final HEXInterpreter RIGHT_PADDED
public static final HEXInterpreter RIGHT_PADDED_F
public static final HEXInterpreter LEFT_PADDED_F
public void interpret(java.lang.String data, byte[] b, int offset)
interpret
in interface Interpreter
public java.lang.String uninterpret(byte[] rawData, int offset, int length)
uninterpret
in interface Interpreter
rawData
- The interpreted data.offset
- The index in rawData to start interpreting at.length
- The number of data units to interpret.public int getPackedLength(int nDataUnits)
getPackedLength
in interface Interpreter