java.lang.Object
com.ibm.jzos.fields.PackedDecimalAsLongField
com.ibm.jzos.fields.daa.PackedUnsignedLongField
- All Implemented Interfaces:
Field
,LongAccessor
- Direct Known Subclasses:
PackedUnsignedLongP10Field
,PackedUnsignedLongP11Field
,PackedUnsignedLongP12Field
,PackedUnsignedLongP13Field
,PackedUnsignedLongP14Field
,PackedUnsignedLongP15Field
,PackedUnsignedLongP16Field
,PackedUnsignedLongP17Field
,PackedUnsignedLongP18Field
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getLong
(byte[] buffer) Answer a long value from the given byte array buffer, at the offset of this field.long
getLong
(byte[] buffer, int bufOffset) Answer a long value from the given byte array buffer, at the bufOffset + offset of this field.void
putLong
(long value, byte[] buffer) Put a long value into the given byte array buffer, at the offset of this field.void
putLong
(long value, byte[] buffer, int bufOffset) Put a long value into the given byte array buffer, at the bufOffset + offset of this field.Methods inherited from class com.ibm.jzos.fields.PackedDecimalAsLongField
equals, getByteLength, getOffset, getPrecision, isSigned, setOffset
-
Constructor Details
-
PackedUnsignedLongField
public PackedUnsignedLongField(int offset, int precision)
-
-
Method Details
-
getLong
public long getLong(byte[] buffer, int bufOffset) Description copied from class:PackedDecimalAsLongField
Answer a long value 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:
getLong
in interfaceLongAccessor
- Overrides:
getLong
in classPackedDecimalAsLongField
- Parameters:
buffer
- the byte arraybufOffset
- the additional offset into the byte array- Returns:
- long
-
getLong
public long getLong(byte[] buffer) Description copied from class:PackedDecimalAsLongField
Answer a long value 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:
getLong
in interfaceLongAccessor
- Overrides:
getLong
in classPackedDecimalAsLongField
- Parameters:
buffer
- the byte array- Returns:
- long
-
putLong
Description copied from class:PackedDecimalAsLongField
Put a long value 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:
putLong
in interfaceLongAccessor
- Overrides:
putLong
in classPackedDecimalAsLongField
- 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
-
putLong
Description copied from class:PackedDecimalAsLongField
Put a long value 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:
putLong
in interfaceLongAccessor
- Overrides:
putLong
in classPackedDecimalAsLongField
- Parameters:
value
- the signed int valuebuffer
- the byte array- Throws:
IllegalArgumentException
- if the value is out of range
-