|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.a2zss.ISO8583.Dec4Bit
public class Dec4Bit
This class can be used for packing integer values to 4 bit decimal numbers and 4bit decimal numbers back to integer values
Method Summary | |
---|---|
static byte[] |
to4Bit(int n,
int len)
converts an integer value to 4bit decimals where each decimal is presented by half of the byte values 0000..1001 if the len the length in bytes desired if the lenth of integer n is odd then a extra half of bye with 0000 is prepended |
static int |
toInt(byte[] b4bit,
int len)
converts an 4 bit packed decimals to an integer value |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final byte[] to4Bit(int n, int len)
n
- - the number value to packlen
- - the lengh of the returned value in bytes
public static final int toInt(byte[] b4bit, int len)
b4bit
- the 4 bit packed decimals 0000...1001len
- the length of 4bit data to be used as 4 bit data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |