* of the above mentioned methods.
*/
public void marshal (final TaggedProfileHolder tagged_profile,
final TaggedComponentSeqHolder componentSequence)
{
TaggedComponentSeqHolder compSeq = componentSequence;
if (encapsulation() != 0)
{
// You're going to have to define your own marshal operation
// for littleEndian profiles.
// The CDROutputStream only does big endian currently.
throw new BAD_PARAM("We can only marshal big endian stylee profiles !!");
}
// Start a CDR encapsulation for the profile_data
CDROutputStream profileDataStream = new CDROutputStream();
try
{
profileDataStream.beginEncapsulatedArray();
// Write the opaque AddressProfile bytes for this profile...
writeAddressProfile(profileDataStream);
// ... then the object key
profileDataStream.write_long(objectKey.length);
profileDataStream.write_octet_array(objectKey,0,objectKey.length);
switch( version.minor )
{
case 0 :
// For GIOP 1.0 there were no tagged components
break;
default :
// Assume minor != 0 means 1.1 onwards and encode the TaggedComponents
if (compSeq == null)
{
compSeq = new TaggedComponentSeqHolder (new TaggedComponent[0]);
}
// Write the length of the TaggedProfile sequence.
profileDataStream.write_long(this.components.size() + compSeq.value.length);
// Write the TaggedProfiles (ours first, then the ORB's)