public interface CodecOperations
Codec
provides a mechanism
to transfer these components between their IDL data types and their CDR
encapsulation representations.
A Codec
is obtained from the CodecFactory
.
The CodecFactory
is obtained through a call to
ORB.resolve_initial_references( "CodecFactory" )
.
Modifier and Type | Method and Description |
---|---|
Any |
decode_value(byte[] data,
TypeCode tc)
Decodes the given byte array into an Any based on the given
TypeCode and the encoding format effective for
this Codec . |
Any |
decode(byte[] data)
Decodes the given byte array into an Any based on the encoding
format effective for this
Codec . |
byte[] |
encode_value(Any data)
Converts the given any into a byte array based on the encoding
format effective for this Codec.
|
byte[] |
encode(Any data)
Converts the given any into a byte array based on the encoding
format effective for this
Codec . |
byte[] encode(Any data) throws InvalidTypeForEncoding
Codec
.InvalidTypeForEncoding
- thrown if the type is not valid for
the encoding format effective for this Codec
.data
- The data, in the form of an any, to be encoded into
a byte array.TypeCode
and the data of the type.Any decode(byte[] data) throws FormatMismatch
Codec
.FormatMismatch
- is thrown if the byte array cannot be
decoded into an Any.data
- The data, in the form of a byte array, to be decoded into
an Any.byte[] encode_value(Any data) throws InvalidTypeForEncoding
TypeCode
.InvalidTypeForEncoding
- thrown if the type is not valid for
the encoding format effective for this Codec
.data
- The data, in the form of an Any, to be encoded into
a byte array.Any decode_value(byte[] data, TypeCode tc) throws FormatMismatch, TypeMismatch
TypeCode
and the encoding format effective for
this Codec
.FormatMismatch
- thrown if the byte array cannot be
decoded into an Any.TypeMismatch
data
- The data, in the form of a byte array, to be decoded
into an Any.tc
- The TypeCode to be used to decode the data.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.