public class ContainingOctetString extends ExtendibleOctetString
ContainingOctetString ::= SEQUENCE { byteArray SEQUENCE OF INTEGER (-128 .. 127) OPTIONAL, contained OPTIONAL -- OPEN }ContainingOctetString is used as the representation of values of open type.
FIELD_ABSENT, FIELD_UNINITIALISED
Constructor and Description |
---|
ContainingOctetString()
Nullary constructor.
|
ContainingOctetString(byte[] byteArray)
Constructs from a given initial byte array.
|
ContainingOctetString(byte[] byteArray,
Throwable decodingError)
Constructs from a given initial byte array and a Throwable from trying to decode that array.
|
ContainingOctetString(DataObject value)
Constructs from a given DataObject value.
|
Modifier and Type | Method and Description |
---|---|
ContainingOctetString |
clone()
Constructs a copy of this object and everything reachable from it.
|
static ContainingOctetString |
copyOf(ContainingOctetString from)
Creates a new object of this type, initialising its field values from those of the given object.
|
DataObject |
getContainedValue()
Gets the contained value.
|
Throwable |
getDecodingError()
Get the decoding error associated with this ContainingOctetString.
|
static FieldAccessor[] |
getFieldAccessors()
Gets a new array of the accessors for fields of this type.
|
Map<String,Object> |
getFieldsMap(boolean withAbsents)
Gets a Map from field-name to field-value containing just the byte array field.
|
boolean |
hasContainedValue()
Tests whether a contained value is present.
|
ContainingOctetString |
setByteArray(byte[] value)
Sets the value of the field byteArray.
|
ContainingOctetString |
setContainedValue(DataObject value)
Sets the contained value.
|
getByteArray, hasByteArray
equals, hashCode, toString
checkModify, isReadOnly, setReadOnly
public ContainingOctetString()
public ContainingOctetString(byte[] byteArray)
byteArray
- byte arraypublic ContainingOctetString(byte[] byteArray, Throwable decodingError)
byteArray
- byte arraydecodingError
- Throwablepublic ContainingOctetString(DataObject value)
value
- DataObjectpublic ContainingOctetString clone()
clone
in interface DataObject
clone
in class AbstractDataObject
public static ContainingOctetString copyOf(ContainingOctetString from)
from
- the object from which to copypublic static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap
in class ExtendibleOctetString
withAbsents
- whether to put absent optional fields into Mappublic DataObject getContainedValue()
public boolean hasContainedValue()
public ContainingOctetString setContainedValue(DataObject value) throws IllegalStateException
value
- the new contained valueIllegalStateException
- if this instance has been marked as read-onlypublic ContainingOctetString setByteArray(byte[] value) throws IllegalStateException
setByteArray
in class ExtendibleOctetString
value
- the new value for the fieldIllegalStateException
- if this instance has been marked as read-onlypublic Throwable getDecodingError()
null
if this instance was not built with a decoding error