Package com.sun.corba.se.spi.ior

Source Code of com.sun.corba.se.spi.ior.TaggedComponentBase

/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/

package com.sun.corba.se.spi.ior;

import org.omg.CORBA_2_3.portable.InputStream ;

import com.sun.corba.se.impl.encoding.EncapsOutputStream ;

import com.sun.corba.se.spi.orb.ORB ;


/** Base class to use for implementing TaggedComponents.  It implements
* the getIOPComponent method using the TaggedComponent.write() method.
* @author Ken Cavanaugh
*/
public abstract class TaggedComponentBase extends IdentifiableBase
    implements TaggedComponent
{
    public org.omg.IOP.TaggedComponent getIOPComponent(
        org.omg.CORBA.ORB orb )
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)orb);
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream() ) ;
        return org.omg.IOP.TaggedComponentHelper.read( is ) ;
    }
}
TOP

Related Classes of com.sun.corba.se.spi.ior.TaggedComponentBase

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.