java.lang.Object
com.yaftp.utils.DataStructure
com.yaftp.utils.PackedDecimal
- public class PackedDecimal
- extends DataStructure
|
Constructor Summary |
PackedDecimal(byte[] Packed_Origin,
int Offset,
int IntSize,
int DecSize)
Construct using an existing byte array(Supose to point on
a valid packed decimal format or to be translated later
with toPackedDecimal method |
|
Method Summary |
static int |
getPackedSize(int intSize,
int decSize)
giving int Size + dec size returns physical size
necessary to store the packed decimal data |
static void |
main(java.lang.String[] Argv)
Just use the main method for Class unit testing |
void |
toPackedDecimal(java.lang.String Number)
Build a packed decimal from a string number
Convert the in String +-99999.99 in an packed decimal IBM data
Flow -> Each digit is a 0..9 Numerical value last digit is the sign
digit : A|C|E|F => + ; B|D => - ; the decimal point is virtual
its position is defined in the second byte of dec_len |
java.lang.String |
toString()
Translate current Packed into a String representation |
DEFAULT_NEGATIVE
private static final byte DEFAULT_NEGATIVE
- See Also:
- Constant Field Values
DEFAULT_POSITIVE
private static final byte DEFAULT_POSITIVE
- See Also:
- Constant Field Values
ASCII_HIGH_CHAR_NIBBLE
private static final byte ASCII_HIGH_CHAR_NIBBLE
- See Also:
- Constant Field Values
MAX_DECIMAL_STRING_SIZE
private static final int MAX_DECIMAL_STRING_SIZE
- See Also:
- Constant Field Values
CBL_SIGN_POS1
private static final byte CBL_SIGN_POS1
- See Also:
- Constant Field Values
CBL_SIGN_POS2
private static final byte CBL_SIGN_POS2
- See Also:
- Constant Field Values
CBL_SIGN_POS3
private static final byte CBL_SIGN_POS3
- See Also:
- Constant Field Values
CBL_SIGN_POS4
private static final byte CBL_SIGN_POS4
- See Also:
- Constant Field Values
_PackedWk
private byte[] _PackedWk
_IntSize
private int _IntSize
_DecSize
private int _DecSize
_Logical_Dest_Size
private int _Logical_Dest_Size
PackedDecimal
public PackedDecimal(byte[] Packed_Origin,
int Offset,
int IntSize,
int DecSize)
- Construct using an existing byte array(Supose to point on
a valid packed decimal format or to be translated later
with toPackedDecimal method
getPackedSize
public static int getPackedSize(int intSize,
int decSize)
- giving int Size + dec size returns physical size
necessary to store the packed decimal data
toPackedDecimal
public void toPackedDecimal(java.lang.String Number)
throws java.lang.NumberFormatException
- Build a packed decimal from a string number
Convert the in String +-99999.99 in an packed decimal IBM data
Flow -> Each digit is a 0..9 Numerical value last digit is the sign
digit : A|C|E|F => + ; B|D => - ; the decimal point is virtual
its position is defined in the second byte of dec_len
toString
public java.lang.String toString()
- Translate current Packed into a String representation
main
public static void main(java.lang.String[] Argv)
- Just use the main method for Class unit testing