Class Cksn

  • All Implemented Interfaces:
    DataObject, Serializable

    public final class Cksn
    extends AbstractEncodedDataObject<NamedInteger>
    Class Cksn encapsulates a cyphering key sequence number. It represents the ASN.1 OCTET STRING type MAP-MS-DataTypes.Cksn.

    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 24.008 V10.1.0 (2010-12) §10.5.1.2 p382
    87654321
    Octet 0Cyphering key sequence number IEISpare (0)Key sequence
    See Also:
    Serialized Form
    • Constructor Detail

      • Cksn

        public Cksn​(byte[] data)
        Constructs a new Cksn object from network-encoded data.
        Parameters:
        data - network-encoded data
        Throws:
        NullPointerException - if data is null
      • Cksn

        public Cksn​(byte[] data,
                    int start,
                    int len)
        Constructs a new Cksn object from part of network-encoded data. The part starts at index start and is len bytes long. The most significant byte of the numeric value is in the lowest indexed byte of the array.
        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 NamedInteger getEncodedForm()
        Gets the encoded form.
        Returns:
        encoded form
      • getByteArrayForm

        public byte[] getByteArrayForm()
        Gets the byte array encoded form. The size of the array is the least of 1, 2, 4, or 8 according to the type's bounds. The most significant byte of the numeric value is in the lowest indexed byte of the array.
        Returns:
        byte array form
      • getFieldsMap

        public Map<String,​Object> getFieldsMap​(boolean withAbsents)
        Gets a Map from "encodedValue" to NamedInteger.
        Specified by:
        getFieldsMap in class AbstractFieldsObject
        Parameters:
        withAbsents - ignored
        Returns:
        Map from "encodedValue" to NamedInteger
      • clone

        public Cksn clone()
        Constructs a new mutable object that has a copy of the encoded state of this one.
        Specified by:
        clone in interface DataObject
        Specified by:
        clone in class AbstractDataObject
        Returns:
        cloned object