public abstract class AbstractLazyEncodedByteArray extends AbstractLazyEncodedDataObject<byte[]>
All subclasses should define
static int getContainedLength(byte[] data, int start, int len)
and use it in decode()
to ensure that the contained value
exactly fills the array.
isDecoded
encoded
FIELD_ABSENT, FIELD_UNINITIALISED
Modifier | Constructor and Description |
---|---|
protected |
AbstractLazyEncodedByteArray()
Constructs a new AbstractLazyEncodedByteArray with no field values.
|
protected |
AbstractLazyEncodedByteArray(byte[] data)
Constructs a new AbstractLazyEncodedByteArray object from network-encoded data.
|
protected |
AbstractLazyEncodedByteArray(byte[] data,
int start,
int len)
Constructs a new AbstractLazyEncodedByteArray from part of given network-encoded data.
|
checkDecode, checkFieldsSet, checkModifyAndDecode, decode, encode
equals, getFieldsMap, hashCode, toString
checkModify, clone, isReadOnly, setReadOnly
protected AbstractLazyEncodedByteArray()
protected AbstractLazyEncodedByteArray(byte[] data)
data
- network-encoded dataNullPointerException
- if data is nullprotected AbstractLazyEncodedByteArray(byte[] data, int start, int len)
start
and is len
bytes long.
The state is in the encoded form:
it is not decoded and might not be decodable.data
- network-encoded datastart
- starting offset of network-encoded datalen
- length of encoded part in bytesNullPointerException
- if data is nullIllegalArgumentException
- if len is negativeArrayIndexOutOfBoundsException
- if the part is not within the data