- java.lang.Object
-
- com.ibm.jzos.fields.BinaryAsIntField
-
- com.ibm.jzos.fields.daa.BinarySignedIntField
-
- All Implemented Interfaces:
Field,IntAccessor
- Direct Known Subclasses:
BinarySignedIntL1Field,BinarySignedIntL2Field,BinarySignedIntL3Field,BinarySignedIntL4Field
public class BinarySignedIntField extends BinaryAsIntField
-
-
Field Summary
-
Fields inherited from class com.ibm.jzos.fields.BinaryAsIntField
DEFAULT_FIELD_WIDTH, MAX_FIELD_WIDTH, SIGNED_MAX_LEN1_VAL, SIGNED_MAX_LEN2_VAL, SIGNED_MAX_LEN3_VAL, SIGNED_MAX_LEN4_VAL, SIGNED_MIN_LEN1_VAL, SIGNED_MIN_LEN2_VAL, SIGNED_MIN_LEN3_VAL, SIGNED_MIN_LEN4_VAL, UNSIGNED_MAX_LEN1_VAL, UNSIGNED_MAX_LEN2_VAL, UNSIGNED_MAX_LEN3_VAL, UNSIGNED_MAX_LEN4_VAL
-
-
Constructor Summary
Constructors Constructor Description BinarySignedIntField(int offset)Construct an instance with a field width = DEFAULT_FIELD_WIDTH = 4.BinarySignedIntField(int offset, int length)Construct an signed instance with a given offset and length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetInt(byte[] buffer)Answer an int from the given byte array buffer, at the offset of this field.intgetInt(byte[] buffer, int bufOffset)Answer an int from the given byte array buffer, at the bufOffset + offset of this field.voidputInt(int value, byte[] buffer)Put a signed int into the given byte array buffer, at the offset of this field.voidputInt(int value, byte[] buffer, int bufOffset)Put a signed int into thegiven byte array buffer, at the bufOffset + offset of this field.voidsetSigned(boolean signed)-
Methods inherited from class com.ibm.jzos.fields.BinaryAsIntField
equals, getByteLength, getOffset, isSigned, setOffset
-
-
-
-
Constructor Detail
-
BinarySignedIntField
public BinarySignedIntField(int offset)
Construct an instance with a field width = DEFAULT_FIELD_WIDTH = 4.- Parameters:
offset- int the offset in some byte array to the start of this field.
-
BinarySignedIntField
public BinarySignedIntField(int offset, int length)Construct an signed instance with a given offset and length.- Parameters:
offset- int the offset in some byte array to the start of this field.length- int the size of the field in bytes
-
-
Method Detail
-
setSigned
public void setSigned(boolean signed)
- Overrides:
setSignedin classBinaryAsIntField- See Also:
BinaryAsIntField.isSigned()
-
getInt
public int getInt(byte[] buffer)
Description copied from class:BinaryAsIntFieldAnswer an int from the given byte array buffer, at the offset of this field.- Specified by:
getIntin interfaceIntAccessor- Overrides:
getIntin classBinaryAsIntField- Parameters:
buffer- the byte array- Returns:
- int
-
getInt
public int getInt(byte[] buffer, int bufOffset)Description copied from class:BinaryAsIntFieldAnswer an int from the given byte array buffer, at the bufOffset + offset of this field.- Specified by:
getIntin interfaceIntAccessor- Overrides:
getIntin classBinaryAsIntField- Parameters:
buffer- the byte arraybufOffset- the additional offset into the byte array- Returns:
- int
-
putInt
public void putInt(int value, byte[] buffer)Description copied from class:BinaryAsIntFieldPut a signed int into the given byte array buffer, at the offset of this field.- Specified by:
putIntin interfaceIntAccessor- Overrides:
putIntin classBinaryAsIntField- Parameters:
value- the signed int valuebuffer- the byte array
-
putInt
public void putInt(int value, byte[] buffer, int bufOffset)Description copied from class:BinaryAsIntFieldPut a signed int into thegiven byte array buffer, at the bufOffset + offset of this field.- Specified by:
putIntin interfaceIntAccessor- Overrides:
putIntin classBinaryAsIntField- Parameters:
value- the signed int valuebuffer- the byte arraybufOffset- the additional offset into the byte array
-
-