Class GSNAddress
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<byte[]>
-
- com.opencloud.slee.resources.in.datatypes.map.GSNAddress
-
- All Implemented Interfaces:
DataObject
,Serializable
public final class GSNAddress extends AbstractEncodedDataObject<byte[]>
Class GSNAddress encapsulates a GPRS Support Node address. It represents the ASN.1 OCTET STRING type MAP-CommonDataTypes.GSN-Address.This is a skeleton API, designed so that a binary-compatible convenience API could be introduced without having to upgrade to a new release.
The encoded representation is as tabulated below.
Data Encoding - based on 3GPP TS 23.003 V10.0.0 (2010-12) §5.1 pp25-26 8 7 6 5 4 3 2 1 Octet 0 Address type Address length Octet 1.. Address - See Also:
- Serialized Form
-
-
Field Summary
-
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 Constructor Description GSNAddress(byte[] data)
Constructs a new GSNAddress object from network-encoded data.GSNAddress(byte[] data, int start, int len)
Constructs a new GSNAddress object from part of network-encoded data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GSNAddress
clone()
Constructs a new mutable object that has a copy of the encoded state of this one.byte[]
getEncodedForm()
Gets the encoded form.Map<String,Object>
getFieldsMap(boolean withAbsents)
Gets a Map from "encodedValue" to byte[].-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
GSNAddress
public GSNAddress(byte[] data)
Constructs a new GSNAddress object from network-encoded data.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
GSNAddress
public GSNAddress(byte[] data, int start, int len)
Constructs a new GSNAddress object from part of network-encoded data. The part starts at indexstart
and islen
bytes long.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- length of the part- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negative
-
-
Method Detail
-
getEncodedForm
public byte[] getEncodedForm()
Gets the encoded form.- Returns:
- encoded form
-
getFieldsMap
public Map<String,Object> getFieldsMap(boolean withAbsents)
Gets a Map from "encodedValue" to byte[].- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- ignored- Returns:
- Map from "encodedValue" to byte[]
-
clone
public GSNAddress clone()
Constructs a new mutable object that has a copy of the encoded state of this one.- Specified by:
clone
in interfaceDataObject
- Specified by:
clone
in classAbstractDataObject
- Returns:
- cloned object
-
-