This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


org.omg.IOP
interface CodecOperations


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(byte[] data)

          Decodes the given byte array into an Any based on the encoding format effective for this Codec.
 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.
 byte[]
encode(Any data)

          Converts the given any into a byte array based on the encoding format effective for this Codec.
 byte[]

          Converts the given any into a byte array based on the encoding format effective for this Codec.
 

Method Detail

decode

public Any decode(byte[] data)
           throws FormatMismatch
Decodes the given byte array into an Any based on the encoding format effective for this Codec.

Parameters:
data - The data, in the form of a byte array, to be decoded into an Any.
Returns:
An Any containing the data from the decoded byte array.
Throws:
FormatMismatch

decode_value

public Any decode_value(byte[] data,
                        TypeCode tc)
                 throws FormatMismatch,
                        TypeMismatch
Decodes the given byte array into an Any based on the given TypeCode and the encoding format effective for this Codec.

Parameters:
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.
Returns:
An Any containing the data from the decoded byte array.
Throws:
FormatMismatch
TypeMismatch

encode

public byte[] encode(Any data)
              throws InvalidTypeForEncoding
Converts the given any into a byte array based on the encoding format effective for this Codec.

Parameters:
data - The data, in the form of an any, to be encoded into a byte array.
Returns:
A byte array containing the encoded Any. This byte array contains both the TypeCode and the data of the type.
Throws:
InvalidTypeForEncoding

encode_value

public byte[] encode_value(Any data)
                    throws InvalidTypeForEncoding
Converts the given any into a byte array based on the encoding format effective for this Codec. Only the data from the Any is encoded, not the TypeCode.

Parameters:
data - The data, in the form of an Any, to be encoded into a byte array.
Returns:
A byte array containing the data from the encoded any.
Throws:
InvalidTypeForEncoding


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.