//
// As part of the GIOP 1.2 work, the CDRInput and OutputStream will
// be versioned. This can be handled once this work is complete.
// Create output stream with default endianness.
EncapsOutputStream cdrOut = new EncapsOutputStream(
(com.sun.corba.se.spi.orb.ORB)orb, giopVersion );
// This is an encapsulation, so put out the endian:
cdrOut.putEndian();
// Sometimes encode type code:
if( sendTypeCode ) {
cdrOut.write_TypeCode( data.type() );
}
// Encode value and return.
data.write_value( cdrOut );
return cdrOut.toByteArray();
}