|
VisiBroker for Java |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CodecOperations
The formats of IOR components and service context data used by ORB services are often defined as CDR encapsulations encoding instances of IDL defined data types. The 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").
Method Summary | |
---|---|
Any |
decode_value(byte[] data,
TypeCode tc)
This method decodes the given octet sequence into a CORBA.Any based on the given TypeCode and the
encoding format effective for this Codec . |
Any |
decode(byte[] data)
This method decodes the given octet sequence into a CORBA.Any object based on the encoding format effective
for this Codec . |
byte[] |
encode_value(Any data)
This method converts the given CORBA.Any object into an octet sequence based on the encoding format
effective for this Codec . |
byte[] |
encode(Any data)
This method converts the given data in the form of a CORBA.Any into an octet sequence based on the encoding format
effective for this Codec . |
Method Detail |
---|
Any decode_value(byte[] data, TypeCode tc) throws FormatMismatch, TypeMismatch
CORBA.Any
based on the given TypeCode
and the
encoding format effective for this Codec
.
This method raises FormatMismatch
if the octet sequence cannot be decoded into a CORBA.Any
.
data
- The data, in the form of an octet sequence, to be decoded into a CORBA.Any.tc
- The TypeCode to be used to decode the data.
CORBA.Any
decoded octet sequence in the form of Any.
FormatMismatch
- octet sequence cannot be decoded into CORBA.Any
.
TypeMismatch
- TypeCode
does not match a given octet sequence.byte[] encode_value(Any data) throws InvalidTypeForEncoding
CORBA.Any
object into an octet sequence based on the encoding format
effective for this Codec
. Only the data from the CORBA.Any
is encoded, not the TypeCode
.
This operation may raise InvalidTypeForEncoding
.
data
- An octet sequence containing the data from the encoded CORBA.Any
.
InvalidTypeForEncoding
- Invalid type is specified for encoding.Any decode(byte[] data) throws FormatMismatch
CORBA.Any
object based on the encoding format effective
for this Codec
.
data
- The data, in the form of an octet sequence, to be decoded into a CORBA.Any
.
FormatMismatch
- cannot be decoded into a CORBA.Any
.byte[] encode(Any data) throws InvalidTypeForEncoding
CORBA.Any
into an octet sequence based on the encoding format
effective for this Codec
. This octet sequence contains both the TypeCode
and the data of the type.
This operation may raise InvalidTypeForEncoding
.
data
- The data, in the form of a CORBA.Any, to be encoded into an octet sequence.
InvalidTypeForEncoding
- Invalid type is specified for encoding.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |