KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > ior > IdentifiableBase


1 /*
2  * @(#)IdentifiableBase.java 1.7 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.ior;
9
10 import org.omg.CORBA_2_3.portable.OutputStream JavaDoc ;
11
12 import com.sun.corba.se.spi.ior.Writeable ;
13 import com.sun.corba.se.spi.ior.WriteContents ;
14 import com.sun.corba.se.spi.orb.ORB ;
15
16 import com.sun.corba.se.impl.ior.EncapsulationUtility ;
17
18 /** Provide support for properly reading and writing Identifiable objects
19 * that are also encapsulations (tagged profiles and components).
20 */

21 public abstract class IdentifiableBase implements Identifiable,
22     WriteContents
23 {
24     /** Write the data for this object as a CDR encapsulation.
25     * This is used for writing tagged components and profiles.
26     * These data types must be written out as encapsulations,
27     * which means that we need to first write the data out to
28     * an encapsulation stream, then extract the data and write
29     * it to os as an array of octets.
30     */

31     final public void write( OutputStream JavaDoc os )
32     {
33     EncapsulationUtility.writeEncapsulation( (WriteContents)this, os ) ;
34     }
35 }
36
Popular Tags