Class ContainingOctetString

  • All Implemented Interfaces:
    DataObject, Serializable

    public class ContainingOctetString
    extends ExtendibleOctetString
    A ContainingOctetString is an ExtendibleOctetString that contains a DataObject. This allows any type of value to be contained.
     ContainingOctetString ::= SEQUENCE {
         byteArray SEQUENCE OF INTEGER (-128 .. 127) OPTIONAL,
         contained OPTIONAL -- OPEN
     }
     
    ContainingOctetString is used as the representation of values of open type.
    See Also:
    Serialized Form
    • Constructor Detail

      • ContainingOctetString

        public ContainingOctetString()
        Nullary constructor.
      • ContainingOctetString

        public ContainingOctetString​(byte[] byteArray)
        Constructs from a given initial byte array.
        Parameters:
        byteArray - byte array
      • ContainingOctetString

        public ContainingOctetString​(byte[] byteArray,
                                     Throwable decodingError)
        Constructs from a given initial byte array and a Throwable from trying to decode that array.
        Parameters:
        byteArray - byte array
        decodingError - Throwable
      • ContainingOctetString

        public ContainingOctetString​(DataObject value)
        Constructs from a given DataObject value.
        Parameters:
        value - DataObject
    • Method Detail

      • copyOf

        public static ContainingOctetString copyOf​(ContainingOctetString from)
        Creates a new object of this type, initialising its field values from those of the given object.
        Parameters:
        from - the object from which to copy
        Returns:
        new ContainingOctetString
      • getFieldAccessors

        public static FieldAccessor[] getFieldAccessors()
        Gets a new array of the accessors for fields of this type.
        Returns:
        FieldAccessor[]
      • getFieldsMap

        public Map<String,​Object> getFieldsMap​(boolean withAbsents)
        Gets a Map from field-name to field-value containing just the byte array field.
        Overrides:
        getFieldsMap in class ExtendibleOctetString
        Parameters:
        withAbsents - whether to put absent optional fields into Map
        Returns:
        Map from field-name to field-value
      • getContainedValue

        public DataObject getContainedValue()
        Gets the contained value.
        Returns:
        contained value, or null if not present
      • hasContainedValue

        public boolean hasContainedValue()
        Tests whether a contained value is present.
        Returns:
        boolean
      • getDecodingError

        public Throwable getDecodingError()
        Get the decoding error associated with this ContainingOctetString. This is only non-null if this instance was built with a decoding error.
        Returns:
        the decoding error if present, or null if this instance was not built with a decoding error