com.ibm.jzos.fields.daa
Class PackedSignedLongField
- java.lang.Object
-
- com.ibm.jzos.fields.PackedDecimalAsLongField
-
- com.ibm.jzos.fields.daa.PackedSignedLongField
-
- All Implemented Interfaces:
- Field, LongAccessor
- Direct Known Subclasses:
- PackedSignedLongP10Field, PackedSignedLongP11Field, PackedSignedLongP12Field, PackedSignedLongP13Field, PackedSignedLongP14Field, PackedSignedLongP15Field, PackedSignedLongP16Field, PackedSignedLongP17Field, PackedSignedLongP18Field
public class PackedSignedLongField extends PackedDecimalAsLongField
-
-
Constructor Summary
Constructors Constructor and Description PackedSignedLongField(int offset, int precision)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description longgetLong(byte[] buffer)Answer a long value from the given byte array buffer, at the offset of this field.longgetLong(byte[] buffer, int bufOffset)Answer a long value from the given byte array buffer, at the bufOffset + offset of this field.voidputLong(long value, byte[] buffer)Put a long value into the given byte array buffer, at the offset of this field.voidputLong(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
-
-
-
-
Method Detail
-
getLong
public long getLong(byte[] buffer, int bufOffset)Description copied from class:PackedDecimalAsLongFieldAnswer 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:
getLongin interfaceLongAccessor- Overrides:
getLongin 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:PackedDecimalAsLongFieldAnswer 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:
getLongin interfaceLongAccessor- Overrides:
getLongin classPackedDecimalAsLongField- Parameters:
buffer- the byte array- Returns:
- long
-
putLong
public void putLong(long value, byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsLongFieldPut 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:
putLongin interfaceLongAccessor- Overrides:
putLongin classPackedDecimalAsLongField- 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
-
putLong
public void putLong(long value, byte[] buffer) throws java.lang.IllegalArgumentExceptionDescription copied from class:PackedDecimalAsLongFieldPut 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:
putLongin interfaceLongAccessor- Overrides:
putLongin classPackedDecimalAsLongField- Parameters:
value- the signed int valuebuffer- the byte array- Throws:
java.lang.IllegalArgumentException- if the value is out of range
-
-