com.ibm.jzos.fields.daa
Class PackedBigDecimalField
- java.lang.Object
-
- com.ibm.jzos.fields.PackedDecimalAsBigDecimalField
-
- com.ibm.jzos.fields.daa.PackedBigDecimalField
-
- All Implemented Interfaces:
- BigDecimalAccessor, Field
- Direct Known Subclasses:
- PackedBigDecimalP10Field, PackedBigDecimalP11Field, PackedBigDecimalP12Field, PackedBigDecimalP13Field, PackedBigDecimalP14Field, PackedBigDecimalP15Field, PackedBigDecimalP16Field, PackedBigDecimalP17Field, PackedBigDecimalP18Field, PackedBigDecimalP1Field, PackedBigDecimalP2Field, PackedBigDecimalP3Field, PackedBigDecimalP4Field, PackedBigDecimalP5Field, PackedBigDecimalP6Field, PackedBigDecimalP7Field, PackedBigDecimalP8Field, PackedBigDecimalP9Field
public class PackedBigDecimalField extends PackedDecimalAsBigDecimalField
-
-
Constructor Summary
Constructors Constructor and Description PackedBigDecimalField(int offset, int precision, int scale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.math.BigDecimalgetBigDecimal(byte[] buffer)Answer a BigDecimal from the given byte array buffer, at the offset of this field.java.math.BigDecimalgetBigDecimal(byte[] buffer, int bufOffset)Answer a BigDecimal from the given byte array buffer, at the bufOffset + offset of this field.voidputBigDecimal(java.math.BigDecimal value, byte[] buffer)Put a BigDecimal into the given byte array buffer, at the offset of this field.voidputBigDecimal(java.math.BigDecimal value, byte[] buffer, int bufOffset)Put a BigDecimal into the given byte array buffer, at the bufOffset + offset of this field.-
Methods inherited from class com.ibm.jzos.fields.PackedDecimalAsBigDecimalField
equals, getByteLength, getOffset, getPrecision, getScale, isSigned, setOffset
-
-
-
-
Constructor Detail
-
PackedBigDecimalField
public PackedBigDecimalField(int offset, int precision, int scale)
-
-
Method Detail
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsBigDecimalFieldAnswer a BigDecimal from the given byte array buffer, at the bufOffset + offset of this field.Note: the data is not checked for valid decimal digits, although the sign nibble is checked for a valid value in the range x'A'-x'F'.
- Specified by:
getBigDecimalin interfaceBigDecimalAccessor- Overrides:
getBigDecimalin classPackedDecimalAsBigDecimalField- Parameters:
buffer- the byte arraybufOffset- the additional offset into the byte array- Returns:
- BigDecimal
- Throws:
java.lang.IllegalArgumentException- if the data has a invalid sign nibble
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(byte[] buffer) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsBigDecimalFieldAnswer a BigDecimal from the given byte array buffer, at the offset of this field.Note: the data is not checked for valid decimal digits, although the sign nibble is checked for a valid value in the range x'A'-x'F'.
- Specified by:
getBigDecimalin interfaceBigDecimalAccessor- Overrides:
getBigDecimalin classPackedDecimalAsBigDecimalField- Parameters:
buffer- the byte array- Returns:
- BigDecimal
- Throws:
java.lang.IllegalArgumentException- if the data has a invalid sign nibble
-
putBigDecimal
public void putBigDecimal(java.math.BigDecimal value, byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsBigDecimalFieldPut a BigDecimal into the given byte array buffer, at the bufOffset + offset of this field.Note: if the field is unsigned, a x'F' is supplied as the sign nibble in the field.
- Specified by:
putBigDecimalin interfaceBigDecimalAccessor- Overrides:
putBigDecimalin classPackedDecimalAsBigDecimalField- Parameters:
value- the BigDecimal valuebuffer- the byte arraybufOffset- the additional offset into the byte array- Throws:
java.lang.IllegalArgumentException- if the value is out of range
-
putBigDecimal
public void putBigDecimal(java.math.BigDecimal value, byte[] buffer) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsBigDecimalFieldPut a BigDecimal into the given byte array buffer, at the offset of this field.Note: if the field is unsigned, a x'F' is supplied as the sign nibble in the field.
- Specified by:
putBigDecimalin interfaceBigDecimalAccessor- Overrides:
putBigDecimalin classPackedDecimalAsBigDecimalField- Parameters:
value- the BigDecimal valuebuffer- the byte array- Throws:
java.lang.IllegalArgumentException- if the value is out of range
-
-