|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jzos.fields.ByteArrayField
public class ByteArrayField
A byte array Field
.
Constructor Summary | |
---|---|
ByteArrayField(int offset,
int length)
Construct an instance. |
Method Summary | |
---|---|
boolean |
equals(byte[] ba1,
byte[] ba2)
Compare two byte arrays, possible null, for equality. |
byte[] |
getByteArray(byte[] buffer)
Return a byte array from the given byte array buffer, at the offset of this field. |
byte[] |
getByteArray(byte[] buffer,
int bufOffset)
Return a byte array from the given byte array buffer, at the bufOffset + offset of this field. |
int |
getByteLength()
Answer the length of the field described by the receiver |
int |
getOffset()
Answer the offset of this field into some array of bytes |
void |
putByteArray(byte[] valueBytes,
byte[] buffer)
Put a byte array into the given buffer, at the offset of this field. |
void |
putByteArray(byte[] valueBytes,
byte[] buffer,
int bufOffset)
Put a byte array into the given buffer, starting at the specified offset in the buffer. |
void |
putByteArray(byte[] valueBytes,
int valueBytesOffset,
byte[] buffer)
Put a byte array into the given buffer, starting at an offset in the valueByte array. |
void |
putByteArray(byte[] valueBytes,
int valueBytesOffset,
byte[] buffer,
int bufOffset)
Put a byte array into the given buffer, starting at an offset in the valueByte array and at the specified offset in the buffer. |
void |
setByteLength(int len)
Sets the byte length of the field |
void |
setOffset(int offset)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayField(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 bytesMethod Detail |
---|
public int getByteLength()
Field
getByteLength
in interface Field
Field.getByteLength()
public void setByteLength(int len)
public int getOffset()
Field
getOffset
in interface Field
Field.getOffset()
public void setOffset(int offset)
setOffset
in interface Field
Field.setOffset(int)
public byte[] getByteArray(byte[] buffer)
buffer
- the underlying byte array
public byte[] getByteArray(byte[] buffer, int bufOffset)
buffer
- the underlying byte arraybufOffset
- the additional offset into the byte array
public void putByteArray(byte[] valueBytes, byte[] buffer)
valueBytes
- the byte array to putbuffer
- the destination byte arraypublic void putByteArray(byte[] valueBytes, int valueBytesOffset, byte[] buffer)
valueBytes
- the byte array to putvalueBytesOffset
- the offset into the valueByte arraybuffer
- the destination byte arraypublic void putByteArray(byte[] valueBytes, byte[] buffer, int bufOffset)
valueBytes
- the byte array to putbuffer
- the destination byte arraybufOffset
- the offset into the bufferpublic void putByteArray(byte[] valueBytes, int valueBytesOffset, byte[] buffer, int bufOffset)
valueBytes
- the byte array to putvalueBytesOffset
- the offset into the valueByte arraybuffer
- the destination byte arraybufOffset
- the offset into the bufferpublic boolean equals(byte[] ba1, byte[] ba2)
ba1
- byte[]ba2
- byte[]
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |