public final class CAPIPSSPCapabilities extends AbstractLazyEncodedByteArray implements FastSerializable
The API offered by this class is as if the type were specified in ASN.1 as follows.
CAPIPSSPCapabilities ::= SEQUENCE { iPRoutingAddressSupported BOOLEAN, voiceBackSupported BOOLEAN, voiceInformationViaSpeechSupported BOOLEAN, voiceInformationViaVoiceSupported BOOLEAN, voiceGenerationFromTextSupported BOOLEAN, bilateralPart OCTET STRING (SIZE (3)) OPTIONAL }The class takes care of encoding the field values into a byte-array and decoding field values from a byte-array, the encoded representation being as tabulated below.
Data Encoding - based on comment in ASN.1 module CAP-datatypes | ||||||||
---|---|---|---|---|---|---|---|---|
8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | |
Octet 1 | 0 | Reserved | Reserved | Generation of voice announcements from text supported? | VoiceInformation supported via voice recognition? | VoiceInformation supported via speech recognition? | VoiceBack supported? | IPRoutingAddress supported? |
0 to 3 octets | Bilateral part: network operator / equipment vendor specific |
isDecoded
encoded
FIELD_ABSENT, FIELD_UNINITIALISED
Constructor and Description |
---|
CAPIPSSPCapabilities()
Constructs a new CAPIPSSPCapabilities object with no fields set.
|
CAPIPSSPCapabilities(byte[] data)
Constructs a new CAPIPSSPCapabilities object from network-encoded data.
|
CAPIPSSPCapabilities(byte[] data,
int start,
int len)
Constructs a new CAPIPSSPCapabilities object from part of network-encoded data.
|
CAPIPSSPCapabilities(DataInput in)
Constructs a new CAPIPSSPCapabilities object from data deserialized from a stream that was written by
toStream(DataOutput) . |
Modifier and Type | Method and Description |
---|---|
void |
checkFieldsSet()
Checks that all mandatory fields are present.
|
CAPIPSSPCapabilities |
clone()
Constructs a copy of this object and everything reachable from it.
|
static CAPIPSSPCapabilities |
copyOf(CAPIPSSPCapabilities from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.
|
protected void |
decode()
Computes the decoded form from the encoded form.
|
protected void |
encode()
Computes the encoded form from the decoded form.
|
protected boolean |
encodedIsInvalid()
Determines whether the encoded form is invalid.
|
byte[] |
getBilateralPart()
Gets the value of the bilateral part.
|
byte[] |
getEncodedForm()
Gets the encoded form.
|
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 for the fields of a sequence.
|
boolean |
getIPRoutingAddressSupported()
Gets the value of whether IP routing address is supported.
|
boolean |
getVoiceBackSupported()
Gets the value of whether voice back is supported.
|
boolean |
getVoiceGenerationFromTextSupported()
Gets the value of whether voice generation from text is supported.
|
boolean |
getVoiceInformationViaSpeechSupported()
Gets the value of whether voice information via speech is supported.
|
boolean |
getVoiceInformationViaVoiceSupported()
Gets the value of whether voice information via voice is supported.
|
boolean |
hasBilateralPart()
Tests whether the field BilateralPart has a value.
|
boolean |
hasIPRoutingAddressSupported()
Tests whether the field IPRoutingAddressSupported has a value.
|
boolean |
hasVoiceBackSupported()
Tests whether the field VoiceBackSupported has a value.
|
boolean |
hasVoiceGenerationFromTextSupported()
Tests whether the field VoiceGenerationFromTextSupported has a value.
|
boolean |
hasVoiceInformationViaSpeechSupported()
Tests whether the field VoiceInformationViaSpeechSupported has a value.
|
boolean |
hasVoiceInformationViaVoiceSupported()
Tests whether the field VoiceInformationViaVoiceSupported has a value.
|
CAPIPSSPCapabilities |
setBilateralPart(byte[] value)
Sets the value of the bilateral part.
|
CAPIPSSPCapabilities |
setIPRoutingAddressSupported(boolean value)
Sets the value of whether IP routing address is supported.
|
CAPIPSSPCapabilities |
setIPRoutingAddressSupportedPresent(boolean flag)
Sets the presence or absence of the field IPRoutingAddressSupported.
|
CAPIPSSPCapabilities |
setVoiceBackSupported(boolean value)
Sets the value of whether voice back is supported.
|
CAPIPSSPCapabilities |
setVoiceBackSupportedPresent(boolean flag)
Sets the presence or absence of the field VoiceBackSupported.
|
CAPIPSSPCapabilities |
setVoiceGenerationFromTextSupported(boolean value)
Sets the value of whether voice generation from text is supported.
|
CAPIPSSPCapabilities |
setVoiceGenerationFromTextSupportedPresent(boolean flag)
Sets the presence or absence of the field VoiceGenerationFromTextSupported.
|
CAPIPSSPCapabilities |
setVoiceInformationViaSpeechSupported(boolean value)
Sets the value of whether voice information via speech is supported.
|
CAPIPSSPCapabilities |
setVoiceInformationViaSpeechSupportedPresent(boolean flag)
Sets the presence or absence of the field VoiceInformationViaSpeechSupported.
|
CAPIPSSPCapabilities |
setVoiceInformationViaVoiceSupported(boolean value)
Sets the value of whether voice information via voice is supported.
|
CAPIPSSPCapabilities |
setVoiceInformationViaVoiceSupportedPresent(boolean flag)
Sets the presence or absence of the field VoiceInformationViaVoiceSupported.
|
void |
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading by
CAPIPSSPCapabilities(DataInput) . |
checkDecode, checkModifyAndDecode
equals, hashCode, toString
checkModify, isReadOnly, setReadOnly
public CAPIPSSPCapabilities()
public CAPIPSSPCapabilities(byte[] data)
data
- network-encoded dataNullPointerException
- if data is nullpublic CAPIPSSPCapabilities(byte[] data, int start, int len)
start
and is len
bytes long.
The data is not decoded and might not be decodable.data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- default length if not predictableNullPointerException
- if data is nullIllegalArgumentException
- if len is negativepublic CAPIPSSPCapabilities(DataInput in) throws IOException
toStream(DataOutput)
.in
- the stream to read fromEOFException
- if reading is pre-empted by end-of-fileIOException
- if the data cannot be readpublic void toStream(DataOutput out) throws IOException
CAPIPSSPCapabilities(DataInput)
.toStream
in interface FastSerializable
out
- the stream to write toIOException
- if an I/O error occurspublic boolean hasIPRoutingAddressSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setIPRoutingAddressSupportedPresent(boolean flag) throws IllegalStateException
flag
- whether the field should be marked as presentIllegalStateException
- if this instance has been marked as read-onlypublic boolean hasVoiceBackSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setVoiceBackSupportedPresent(boolean flag) throws IllegalStateException
flag
- whether the field should be marked as presentIllegalStateException
- if this instance has been marked as read-onlypublic boolean hasVoiceInformationViaSpeechSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setVoiceInformationViaSpeechSupportedPresent(boolean flag) throws IllegalStateException
flag
- whether the field should be marked as presentIllegalStateException
- if this instance has been marked as read-onlypublic boolean hasVoiceInformationViaVoiceSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setVoiceInformationViaVoiceSupportedPresent(boolean flag) throws IllegalStateException
flag
- whether the field should be marked as presentIllegalStateException
- if this instance has been marked as read-onlypublic boolean hasVoiceGenerationFromTextSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setVoiceGenerationFromTextSupportedPresent(boolean flag) throws IllegalStateException
flag
- whether the field should be marked as presentIllegalStateException
- if this instance has been marked as read-onlypublic boolean hasBilateralPart() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic void checkFieldsSet() throws EncodeException
checkFieldsSet
in class AbstractLazyEncodedDataObject<byte[]>
EncodeException
- if any mandatory field is not presentpublic boolean getIPRoutingAddressSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean getVoiceBackSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean getVoiceInformationViaSpeechSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean getVoiceInformationViaVoiceSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean getVoiceGenerationFromTextSupported() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic byte[] getBilateralPart() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic CAPIPSSPCapabilities setIPRoutingAddressSupported(boolean value) throws IllegalStateException
value
- boolean representation of whether IP routing address is supportedIllegalStateException
public CAPIPSSPCapabilities setVoiceBackSupported(boolean value) throws IllegalStateException
value
- boolean representation of whether voice back is supportedIllegalStateException
public CAPIPSSPCapabilities setVoiceInformationViaSpeechSupported(boolean value) throws IllegalStateException
value
- boolean representation of whether voice information via speech is supportedIllegalStateException
public CAPIPSSPCapabilities setVoiceInformationViaVoiceSupported(boolean value) throws IllegalStateException
value
- boolean representation of whether voice information via voice is supportedIllegalStateException
public CAPIPSSPCapabilities setVoiceGenerationFromTextSupported(boolean value) throws IllegalStateException
value
- boolean representation of whether voice generation from text is supportedIllegalStateException
public CAPIPSSPCapabilities setBilateralPart(byte[] value) throws IllegalStateException
value
- byte[] representation of the bilateral partIllegalStateException
public static CAPIPSSPCapabilities copyOf(CAPIPSSPCapabilities from)
from
- the object from which to copypublic CAPIPSSPCapabilities clone()
clone
in interface DataObject
clone
in class AbstractDataObject
public static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap
in class AbstractFieldsObject
withAbsents
- whether to put absent optional fields into Mapprotected boolean encodedIsInvalid()
public byte[] getEncodedForm() throws EncodeException
EncodeException
- if encoding failsprotected void encode()
encode
in class AbstractLazyEncodedDataObject<byte[]>
protected void decode()
decode
in class AbstractLazyEncodedDataObject<byte[]>