Class AbstractLazyEncodedByteArray
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<byte[]>
-
- AbstractLazyEncodedByteArray
-
- All Implemented Interfaces:
DataObject
,Serializable
- Direct Known Subclasses:
AccessPointName
,AccessPointName
,AccessPointNameOperatorId
,AddressDelimiter
,AddressString
,BearerCapability
,BearerCapability.ITU_T
,BearerCapability.ITU_T.Ericsson
,BearerCapability.ITU_T.Layer1Capability
,BearerCapability.ITU_T.Layer1Capability.Details
,BearerCapability.ITU_T.Layer1Capability.Details.ParityAndModem
,BearerCapability.ITU_T.Layer3Capability
,CalledPartyBCDNumber
,CalledPartyNumber
,CallingPartyNumber
,CallingPartyRestriction
,CallingPartysCategory
,CAPIPSSPCapabilities
,Cause
,CellGlobalId
,Code
,CUGInterLockCode
,DateAndTime
,EncodedStringWithIndicators
,ForwardCallIndicators
,ForwardingOptions
,GenericDigits
,GenericNumber
,GSMSupplementaryServiceList
,HighLayerCompatibility
,HourMinute
,IMEIAddress
,IMSIAddress
,ISDNSubaddress
,LMSIAddress
,LocalisedServiceAreaId
,LocationAreaId
,LocationNumber
,MSBearerCapability
,MSBearerCapability.GSM
,MSBearerCapability.GSM.Content
,MSBearerCapability.GSM.Content.NonSpeech
,MSBearerCapability.GSM.Content.NonSpeech.Access
,MSBearerCapability.GSM.Content.NonSpeech.Access.O5a
,MSBearerCapability.GSM.Content.NonSpeech.Access.O5a.O5b
,MSBearerCapability.GSM.Content.NonSpeech.DataProtocol
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f
,MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g
,MSBearerCapability.GSM.Content.Speech
,MSClassmark
,MSClassmark.MSClassmark1
,MSClassmark.MSClassmark2
,NSAPAddress
,OriginalCalledNumber
,PriceInHundredthsOfUnits
,RedirectingPartyNumber
,RedirectionInformation
,RPCause
,Signal
,SMSAddress
,SMSSubmit.ValidityPeriod
,SMSSubmit.ValidityPeriod.EnhancedValidityPeriod
,SMSSubmit.ValidityPeriod.EnhancedValidityPeriod.EnhancedDuration
,SMSTimeStamp
,SMSTPDU
,StringIndicators
,TimeAndTimezone
,Treatment
,YearMonthDay
public abstract class AbstractLazyEncodedByteArray extends AbstractLazyEncodedDataObject<byte[]>
Class AbstractLazyEncodedByteArray represents a DataObject in which the state is represented in an encoded form or a decoded form, with conversions between the two forms done lazily (when first needed). The encoded form is a byte array. Having a decoded representation of the state is convenient if the positions of fields in the encoded representation can vary depending on the values of other fields that might not have been supplied yet. For example, the presence/absence of optional fields, and the lengths of variable-length fields, can both affect the positions of later fields. Once an object has been marked read-only, both encoded and decoded forms can co-exist.All subclasses should define
static int getContainedLength(byte[] data, int start, int len)
and use it indecode()
to ensure that the contained value exactly fills the array.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
isDecoded
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractEncodedDataObject
encoded
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Modifier Constructor 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.
-
Method Summary
-
Methods inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
checkDecode, checkFieldsSet, checkModifyAndDecode, decode, encode
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, getFieldsMap, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, clone, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
AbstractLazyEncodedByteArray
protected AbstractLazyEncodedByteArray()
Constructs a new AbstractLazyEncodedByteArray with no field values.
-
AbstractLazyEncodedByteArray
protected AbstractLazyEncodedByteArray(byte[] data)
Constructs a new AbstractLazyEncodedByteArray object from network-encoded data. The state is in the encoded form: it is not decoded and might not be decodable.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
AbstractLazyEncodedByteArray
protected AbstractLazyEncodedByteArray(byte[] data, int start, int len)
Constructs a new AbstractLazyEncodedByteArray from part of given network-encoded data. The part starts at indexstart
and islen
bytes long. The state is in the encoded form: it is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded datalen
- length of encoded part in bytes- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negativeArrayIndexOutOfBoundsException
- if the part is not within the data
-
-