public final class EncodedExternal extends ImmutableDataObject
This class is used to pass EXTERNALs in UserInformation to services when there is no specific codec available, and can also be used by services to send UserInformation blobs without involving a codec.
Additionally, this class is used if a specific codec is available, but decoding of a network message fails. In that case, an instance of EncodedExternal is built containing the undecoded message content and an exception object describing the decoding error that occurred.
Modifier and Type | Class and Description |
---|---|
static class |
EncodedExternal.ExternalEncoding
Possible encoding forms.
|
Constructor and Description |
---|
EncodedExternal(ObjectID directReference,
byte[] encodedSingleASN1Type)
Construct a representation of an EXTERNAL, identified by a
direct-reference only, with a single-ASN1-type encoding.
|
EncodedExternal(ObjectID directReference,
Long indirectReference,
String dataValueDescriptor,
EncodedExternal.ExternalEncoding encoding,
byte[] encodedValue,
Throwable decodingError)
Construct a representation of an EXTERNAL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDataValueDescriptor()
Get the EXTERNAL's data-value-descriptor, if present
|
Throwable |
getDecodingError()
Get the decoding error associated with this EXTERNAL.
|
ObjectID |
getDirectReference()
Get the EXTERNAL's direct-reference, if present
|
byte[] |
getEncodedValue()
Get the encoded value of this EXTERNAL, as a byte array
|
EncodedExternal.ExternalEncoding |
getEncoding()
Get the type of encoding used by this EXTERNAL
|
Long |
getIndirectReference()
Get the EXTERNAL's indirect-reference, if present
|
int |
hashCode() |
String |
toString() |
clone, isReadOnly, setReadOnly
public EncodedExternal(ObjectID directReference, byte[] encodedSingleASN1Type)
directReference
- the direct reference identifying the EXTERNALencodedSingleASN1Type
- the BER encoding of a single ASN.1 type's
valuepublic EncodedExternal(ObjectID directReference, Long indirectReference, String dataValueDescriptor, EncodedExternal.ExternalEncoding encoding, byte[] encodedValue, Throwable decodingError)
directReference
- the direct-reference identifying the EXTERNAL,
or null
if not presentindirectReference
- the indirect-reference identifying the
EXTERNAL, or null
if not presentdataValueDescriptor
- the data-value-descriptor describing the
EXTERNAL, or null
if not presentencoding
- the encoding to use for the EXTERNALencodedValue
- the encoded value of the EXTERNAL's contentsdecodingError
- any exception associated with decoding this EXTERNAL.public ObjectID getDirectReference()
null
if not presentpublic Long getIndirectReference()
null
if not presentpublic String getDataValueDescriptor()
null
if not presentpublic EncodedExternal.ExternalEncoding getEncoding()
public byte[] getEncodedValue()
public Throwable getDecodingError()
null
if this instance did not result from a decoding error