|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.vajhoej.record.BCDUtil
public class BCDUtil
Class TimeUtil converts between bytes with Binary Coded Decimals ant BigDecimal objects.
| Field Summary | |
|---|---|
static byte |
ASCII
ASCII zone nibble. |
static byte |
EBCDIC
EBCDIC zone nibble. |
static byte |
ZERO
Zero zone nibble. |
| Constructor Summary | |
|---|---|
BCDUtil()
|
|
| Method Summary | |
|---|---|
static java.math.BigDecimal |
decodePackedBCD(byte[] b,
int decimals)
Convert from packed BCD to BigDecimal. |
static java.math.BigDecimal |
decodeZonedBCD(byte[] b,
byte zone,
int decimals)
Convert from zoned BCD to BigDecimal. |
static byte[] |
encodePackedBCD(java.math.BigDecimal v,
int decimals,
int length)
Convert from BigDecimal to packed BCD. |
static byte[] |
encodeZonedBCD(java.math.BigDecimal v,
byte zone,
int decimals,
int length)
Convert from BigDecimal to zoned BCD. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte ZERO
public static final byte EBCDIC
public static final byte ASCII
| Constructor Detail |
|---|
public BCDUtil()
| Method Detail |
|---|
public static java.math.BigDecimal decodePackedBCD(byte[] b,
int decimals)
b - bytes with packed BCDdecimals - implied decimals
public static byte[] encodePackedBCD(java.math.BigDecimal v,
int decimals,
int length)
v - BigDecimal objectdecimals - implied decimalslength - length
public static java.math.BigDecimal decodeZonedBCD(byte[] b,
byte zone,
int decimals)
b - bytes with zoned BCDzone - zone nibble valuedecimals - implied decimals
public static byte[] encodeZonedBCD(java.math.BigDecimal v,
byte zone,
int decimals,
int length)
v - BigDecimal objectzone - zone nibble valuedecimals - implied decimalslength - length
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||