java.lang.Object
com.ibm.jzos.fields.PackedDecimalAsIntField
com.ibm.jzos.fields.daa.PackedUnsignedIntField
com.ibm.jzos.fields.daa.PackedUnsignedIntP9Field
- All Implemented Interfaces:
Field
,IntAccessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getInt
(byte[] buffer) Answer a int from the given byte array buffer, at the offset of this field.int
getInt
(byte[] buffer, int bufOffset) Answer a int from the given byte array buffer, at the bufOffset + offset of this field.void
putInt
(int value, byte[] buffer) Put a int into the given byte array buffer, at the offset of this field.void
putInt
(int value, byte[] buffer, int bufOffset) Put a int into the given byte array buffer, at the bufOffset + offset of this field.Methods inherited from class com.ibm.jzos.fields.PackedDecimalAsIntField
equals, getByteLength, getOffset, getPrecision, isSigned, setOffset
-
Constructor Details
-
PackedUnsignedIntP9Field
public PackedUnsignedIntP9Field(int offset)
-
-
Method Details
-
getInt
public int getInt(byte[] buffer, int bufOffset) Description copied from class:PackedDecimalAsIntField
Answer a int 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:
getInt
in interfaceIntAccessor
- Overrides:
getInt
in classPackedUnsignedIntField
- Parameters:
buffer
- the byte arraybufOffset
- the additional offset into the byte array- Returns:
- int
-
getInt
public int getInt(byte[] buffer) Description copied from class:PackedDecimalAsIntField
Answer a int 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:
getInt
in interfaceIntAccessor
- Overrides:
getInt
in classPackedUnsignedIntField
- Parameters:
buffer
- the byte array- Returns:
- int
-
putInt
Description copied from class:PackedDecimalAsIntField
Put a int 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:
putInt
in interfaceIntAccessor
- Overrides:
putInt
in classPackedUnsignedIntField
- Parameters:
value
- the signed int valuebuffer
- the byte arraybufOffset
- the additional offset into the byte array- Throws:
IllegalArgumentException
- if the value is out of range
-
putInt
Description copied from class:PackedDecimalAsIntField
Put a int 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:
putInt
in interfaceIntAccessor
- Overrides:
putInt
in classPackedUnsignedIntField
- Parameters:
value
- the signed int valuebuffer
- the byte array- Throws:
IllegalArgumentException
- if the value is out of range
-