Class AbstractEncodedDataObject<T>
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- All Implemented Interfaces:
DataObject
,Serializable
- Direct Known Subclasses:
AbstractLazyEncodedDataObject
,Cksn
,GSNAddress
public abstract class AbstractEncodedDataObject<T> extends AbstractFieldsObject
Class AbstractEncodedDataObject represents an AbstractFieldsObject in which the state is represented in an encoded form.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected T
encoded
Encoded data.-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEncodedDataObject()
Constructs a new AbstractEncodedDataObject with uninitialised encoded state.protected
AbstractEncodedDataObject(byte[] data, int start, int len)
Constructs a new AbstractEncodedDataObject from part of given network-encoded data.
-
Method Summary
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, getFieldsMap, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, clone, isReadOnly, setReadOnly
-
-
-
-
Field Detail
-
encoded
protected volatile T encoded
Encoded data. Ifnull
then the encoded form of the state is not known. (There may or may not be a decoded form of the state, and that may or may not be known.)
-
-
Constructor Detail
-
AbstractEncodedDataObject
protected AbstractEncodedDataObject()
Constructs a new AbstractEncodedDataObject with uninitialised encoded state.
-
AbstractEncodedDataObject
protected AbstractEncodedDataObject(byte[] data, int start, int len)
Constructs a new AbstractEncodedDataObject from part of given network-encoded data. The part starts at indexstart
and islen
bytes long. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded datalen
- length of encoded data in bytes- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negativeArrayIndexOutOfBoundsException
- if the part is not within the data
-
-