com.ibm.jzos.fields.daa
Class PackedUnsignedIntField
- java.lang.Object
-
- com.ibm.jzos.fields.PackedDecimalAsIntField
-
- com.ibm.jzos.fields.daa.PackedUnsignedIntField
-
- All Implemented Interfaces:
- Field, IntAccessor
- Direct Known Subclasses:
- PackedUnsignedIntP1Field, PackedUnsignedIntP2Field, PackedUnsignedIntP3Field, PackedUnsignedIntP4Field, PackedUnsignedIntP5Field, PackedUnsignedIntP6Field, PackedUnsignedIntP7Field, PackedUnsignedIntP8Field, PackedUnsignedIntP9Field
public class PackedUnsignedIntField extends PackedDecimalAsIntField
-
-
Constructor Summary
Constructors Constructor and Description PackedUnsignedIntField(int offset, int precision)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetInt(byte[] buffer)Answer a int from the given byte array buffer, at the offset of this field.intgetInt(byte[] buffer, int bufOffset)Answer a int from the given byte array buffer, at the bufOffset + offset of this field.voidputInt(int value, byte[] buffer)Put a int into the given byte array buffer, at the offset of this field.voidputInt(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
-
-
-
-
Method Detail
-
getInt
public int getInt(byte[] buffer, int bufOffset)Description copied from class:PackedDecimalAsIntFieldAnswer 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:
getIntin interfaceIntAccessor- Overrides:
getIntin classPackedDecimalAsIntField- Parameters:
buffer- the byte arraybufOffset- the additional offset into the byte array- Returns:
- int
-
getInt
public int getInt(byte[] buffer)
Description copied from class:PackedDecimalAsIntFieldAnswer 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:
getIntin interfaceIntAccessor- Overrides:
getIntin classPackedDecimalAsIntField- Parameters:
buffer- the byte array- Returns:
- int
-
putInt
public void putInt(int value, byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsIntFieldPut 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:
putIntin interfaceIntAccessor- Overrides:
putIntin classPackedDecimalAsIntField- Parameters:
value- the signed int valuebuffer- the byte arraybufOffset- the additional offset into the byte array- Throws:
java.lang.IllegalArgumentException- if the value is out of range
-
putInt
public void putInt(int value, byte[] buffer) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsIntFieldPut 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:
putIntin interfaceIntAccessor- Overrides:
putIntin classPackedDecimalAsIntField- Parameters:
value- the signed int valuebuffer- the byte array- Throws:
java.lang.IllegalArgumentException- if the value is out of range
-
-