public class ExternalDecimalAsBigIntegerField extends java.lang.Object implements BigIntegerAccessor
| Constructor and Description |
|---|
ExternalDecimalAsBigIntegerField(int offset,
int precision,
int scale,
boolean signed,
boolean signTrailing,
boolean signExternal,
boolean blankWhenZero)
Construct an instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.math.BigInteger a,
java.math.BigInteger b)
Compare two BigInteger instances, possibly null, for equality.
|
java.math.BigInteger |
getBigInteger(byte[] buffer)
Answer a BigInteger value from the given byte array buffer,
at the offset of this field.
|
java.math.BigInteger |
getBigInteger(byte[] buffer,
int bufOffset)
Answer a BigInteger value from the given byte array buffer,
at the bufOffset + offset of this field.
|
int |
getByteLength()
Answer the length of the field described by the receiver
|
int |
getOffset()
Answer the offset of this field into some array of bytes
|
int |
getPrecision() |
int |
getScale() |
boolean |
isBlankWhenZero() |
boolean |
isSigned() |
boolean |
isSignExternal() |
boolean |
isSignTrailing() |
void |
putBigInteger(java.math.BigInteger value,
byte[] buffer)
Put a BigInteger value into the given byte array buffer,
at the offset of this field.
|
void |
putBigInteger(java.math.BigInteger value,
byte[] buffer,
int bufOffset)
Put a BigInteger value into the given byte array buffer,
at the bufOffset + offset of this field.
|
void |
setOffset(int offset) |
public ExternalDecimalAsBigIntegerField(int offset,
int precision,
int scale,
boolean signed,
boolean signTrailing,
boolean signExternal,
boolean blankWhenZero)
offset - position of this fieldprecision - total number of digits <= 18.scale - a number implied extra digits <=0 in the whole
number portion of the fieldsigned - if the field has a sign somewheresignTrailing - true if the sign follows the field, false if it precedes itsignExternal - true if the sign occupies a separate byte, false if it only occupies a high-order nibble
Note: signTailing and signExternal are ignored if signed is not true.public int getByteLength()
FieldgetByteLength in interface Fieldpublic int getOffset()
Fieldpublic void setOffset(int offset)
setOffset in interface FieldField.getOffset()public int getPrecision()
public java.math.BigInteger getBigInteger(byte[] buffer)
getBigInteger in interface BigIntegerAccessorbuffer - the byte arraypublic java.math.BigInteger getBigInteger(byte[] buffer,
int bufOffset)
getBigInteger in interface BigIntegerAccessorbuffer - the byte arraybufOffset - the additional offset into the byte arraypublic void putBigInteger(java.math.BigInteger value,
byte[] buffer)
throws java.lang.IllegalArgumentException
putBigInteger in interface BigIntegerAccessorvalue - the BigInteger valuebuffer - the byte arrayjava.lang.IllegalArgumentException - if the value is out of rangepublic void putBigInteger(java.math.BigInteger value,
byte[] buffer,
int bufOffset)
throws java.lang.IllegalArgumentException
putBigInteger in interface BigIntegerAccessorvalue - the BigInteger valuebuffer - the byte arraybufOffset - the additional offset into the byte arrayjava.lang.IllegalArgumentException - if the value is out of rangepublic boolean equals(java.math.BigInteger a,
java.math.BigInteger b)
a - BigIntegerb - BigIntegerpublic boolean isBlankWhenZero()
public int getScale()
public boolean isSigned()
public boolean isSignExternal()
public boolean isSignTrailing()