Class 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
    87654321
    Octet 0Address typeAddress length
    Octet 1..Address
    See Also:
    Serialized Form
    • 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 index start and is len bytes long.
        Parameters:
        data - network-encoded data
        start - starting offset of network-encoded data in byte array
        len - length of the part
        Throws:
        NullPointerException - if data is null
        IllegalArgumentException - 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 class AbstractFieldsObject
        Parameters:
        withAbsents - ignored
        Returns:
        Map from "encodedValue" to byte[]