public class BinaryUnsignedIntField extends 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 and Description |
|---|
BinaryUnsignedIntField(int offset)
Construct a unsigned instance with a field width = DEFAULT_FIELD_WIDTH = 4.
|
BinaryUnsignedIntField(int offset,
int length)
Construct an unsigned instance with a given offset and length.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInt(byte[] buffer)
Answer an int from the given byte array buffer,
at the offset of this field.
|
int |
getInt(byte[] buffer,
int bufOffset)
Answer an int from the given byte array buffer,
at the bufOffset + offset of this field.
|
void |
putInt(int value,
byte[] buffer)
Put a signed int into the given byte array buffer,
at the offset of this field.
|
void |
putInt(int value,
byte[] buffer,
int bufOffset)
Put a signed int into thegiven byte array buffer,
at the bufOffset + offset of this field.
|
void |
setSigned(boolean signed) |
equals, getByteLength, getOffset, isSigned, setOffsetpublic BinaryUnsignedIntField(int offset)
offset - int the offset in some byte array to the start of this field.public BinaryUnsignedIntField(int offset,
int length)
offset - int the offset in some byte array to the start of this field.length - int the size of the field in bytespublic void setSigned(boolean signed)
setSigned in class BinaryAsIntFieldBinaryAsIntField.isSigned()public int getInt(byte[] buffer)
BinaryAsIntFieldgetInt in interface IntAccessorgetInt in class BinaryAsIntFieldbuffer - the byte arraypublic int getInt(byte[] buffer,
int bufOffset)
BinaryAsIntFieldgetInt in interface IntAccessorgetInt in class BinaryAsIntFieldbuffer - the byte arraybufOffset - the additional offset into the byte arraypublic void putInt(int value,
byte[] buffer)
BinaryAsIntFieldputInt in interface IntAccessorputInt in class BinaryAsIntFieldvalue - the signed int valuebuffer - the byte arraypublic void putInt(int value,
byte[] buffer,
int bufOffset)
BinaryAsIntFieldputInt in interface IntAccessorputInt in class BinaryAsIntFieldvalue - the signed int valuebuffer - the byte arraybufOffset - the additional offset into the byte array