|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jzos.fields.BinaryAsLongField
public class BinaryAsLongField
A 4-8 byte binary Field
with long accessors.
Constructor Summary | |
---|---|
BinaryAsLongField(int offset,
int length,
boolean signed)
Construct an instance. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Long aLong,
long along)
Compare a Long, possibly null, with a long for equality. |
int |
getByteLength()
Answer the length of the field described by the receiver |
long |
getLong(byte[] buffer)
Answer a long from the given byte array buffer, at the offset of this field. |
long |
getLong(byte[] buffer,
int bufOffset)
Answer a long from the given byte array buffer, at the bufOffset + offset of this field. |
int |
getOffset()
Answer the offset of this field into some array of bytes |
boolean |
isSigned()
Answer true if this field described a signed binary int, false if unsigned. |
void |
putLong(long value,
byte[] buffer)
Put a signed long into thegiven byte array buffer, at the bufOffset of this field. |
void |
putLong(long value,
byte[] buffer,
int bufOffset)
Put a signed long into thegiven byte array buffer, at the bufOffset + offset of this field. |
void |
setOffset(int offset)
|
void |
setSigned(boolean signed)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryAsLongField(int offset, int length, boolean signed)
offset
- int the offset in some byte array to the start of this field.length
- int the size of the field in bytessigned
- boolean true if the field is signed, false if unsigned.Method Detail |
---|
public int getByteLength()
getByteLength
in interface Field
public int getOffset()
getOffset
in interface Field
public void setOffset(int offset)
setOffset
in interface Field
getOffset()
public long getLong(byte[] buffer, int bufOffset)
getLong
in interface LongAccessor
buffer
- the byte arraybufOffset
- the additional offset into the byte array
public long getLong(byte[] buffer)
getLong
in interface LongAccessor
buffer
- the byte array
public void putLong(long value, byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentException
putLong
in interface LongAccessor
value
- the signed long valuebuffer
- the byte arraybufOffset
- the additional offset into the byte array
java.lang.IllegalArgumentException
- if the value is out of rangepublic void putLong(long value, byte[] buffer) throws java.lang.IllegalArgumentException
putLong
in interface LongAccessor
value
- the signed long valuebuffer
- the byte array
java.lang.IllegalArgumentException
- if the value is out of rangepublic boolean isSigned()
isSigned
in interface LongAccessor
public void setSigned(boolean signed)
isSigned()
public boolean equals(java.lang.Long aLong, long along)
aLong
- along
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |