|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.eou.decimal.BinaryUtilities
This class provides a library of static utility functions for handling binary encodings and decodings.
Method Summary | |
static int |
packDPD(int digit1,
int digit2,
int digit3)
Pack three decimal digits (0-9) into 10 bits using Densely-Packed Decimal (DPD) format. |
static int[] |
unpackDPD(int bits)
Unpack 10 bits in Densely-Packed Decimal (DPD) format into three decimal digits (0-9). |
static void |
unpackDPD(int bits,
int[] result,
int index)
Unpack 10 bits in Densely-Packed Decimal (DPD) format into three decimal digits (0-9), writing the three digit values into the specified array at the supplied position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int packDPD(int digit1, int digit2, int digit3)
digit1
- the first of the three digits to be packed.digit2
- the second of the three digits to be packed.digit3
- the third of the three digits to be packed.
public static int[] unpackDPD(int bits)
bits
- three decimal digits packed using DPD format, with
the first bit in bit 9 and the last bit in bit 0 of an int.
public static void unpackDPD(int bits, int[] result, int index)
bits
- three decimal digits packed using DPD format, with
the first bit in bit 9 and the last bit in bit 0 of an int.result
- an array into which three integer digit values
will be written.index
- the index into the array where the first integer
digit value will be written. The second and third values will
be written into the two successive positions.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |