com.sun.corba.se.impl.interceptors
public final class: CDREncapsCodec [javadoc |
source]
java.lang.Object
org.omg.CORBA.LocalObject
com.sun.corba.se.impl.interceptors.CDREncapsCodec
All Implemented Interfaces:
Codec, Object
CDREncapsCodec is an implementation of Codec, as described
in orbos/99-12-02, that supports CDR encapsulation version 1.0, 1.1, and
1.2.
| Field Summary |
|---|
| ORBUtilSystemException | wrapper | |
| Constructor: |
public CDREncapsCodec(ORB orb,
int major,
int minor) {
this.orb = orb;
wrapper = ORBUtilSystemException.get(
(com.sun.corba.se.spi.orb.ORB)orb, CORBALogDomains.RPC_PROTOCOL ) ;
giopVersion = GIOPVersion.getInstance( (byte)major, (byte)minor );
}
Creates a new codec implementation. Uses the given ORB to create
CDRInputStreams when necessary. Parameters:
orb - The ORB to use to create a CDRInputStream or CDROutputStream
major - The major version of GIOP we are encoding for
minor - The minor version of GIOP we are encoding for
|
| Methods from org.omg.CORBA.LocalObject: |
|---|
|
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection |
| Method from com.sun.corba.se.impl.interceptors.CDREncapsCodec Detail: |
public Any decode(byte[] data) throws FormatMismatch {
if( data == null )
throw wrapper.nullParam() ;
return decodeImpl( data, null );
}
Decode the given octet sequence into an any based on a CDR
encapsulated octet sequence. |
public Any decode_value(byte[] data,
TypeCode tc) throws TypeMismatch, FormatMismatch {
if( data == null )
throw wrapper.nullParam() ;
if( tc == null )
throw wrapper.nullParam() ;
return decodeImpl( data, tc );
}
Decode the given octet sequence into an any based on a CDR
encapsulated octet sequence. The type code is expected not to appear
in the octet sequence, and the given type code is used instead. |
public byte[] encode(Any data) throws InvalidTypeForEncoding {
if ( data == null )
throw wrapper.nullParam() ;
return encodeImpl( data, true );
}
Convert the given any into a CDR encapsulated octet sequence |
public byte[] encode_value(Any data) throws InvalidTypeForEncoding {
if( data == null )
throw wrapper.nullParam() ;
return encodeImpl( data, false );
}
Convert the given any into a CDR encapsulated octet sequence. Only
the data is stored. The type code is not. |