Examples of EncapsOutputStream


Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

     * must be used for writing the service context to a request or reply
     * header.
     */
    public void write(OutputStream s, GIOPVersion gv) throws SystemException
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)(s.orb()), gv);
        os.putEndian() ;
        writeData( os ) ;
        byte[] data = os.toByteArray() ;

        s.write_long(getId());
        s.write_long(data.length);
        s.write_octet_array(data, 0, data.length);
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

    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 ) ;
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

                throw stdWrapper.invalidServiceContextId() ;

            // Convert the "core" service context to an
            // "IOP" ServiceContext by writing it to a
            // CDROutputStream and reading it back.
            EncapsOutputStream out =
                sun.corba.OutputStreamFactory.newEncapsOutputStream(myORB);

            context.write( out, GIOPVersion.V1_2 );
            InputStream inputStream = out.create_input_stream();
            result = ServiceContextHelper.read( inputStream );

            cachedServiceContexts.put( integerId, result );
        }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

        org.omg.IOP.ServiceContext service_context,
        boolean replace )
    {
        int id = 0 ;
        // Convert IOP.service_context to core.ServiceContext:
        EncapsOutputStream outputStream =
           sun.corba.OutputStreamFactory.newEncapsOutputStream(myORB);
        InputStream inputStream = null;
        UnknownServiceContext coreServiceContext = null;
        ServiceContextHelper.write( outputStream, service_context );
        inputStream = outputStream.create_input_stream();

        // Constructor expects id to already have been read from stream.
        coreServiceContext = new UnknownServiceContext(
            inputStream.read_long(),
            (org.omg.CORBA_2_3.portable.InputStream)inputStream );
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

        //
        // 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 =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (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();
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

        return result ;
    }

    public org.omg.IOP.TaggedProfile getIOPProfile()
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(orb);
        os.write_long( getId() ) ;
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream()) ;
        return org.omg.IOP.TaggedProfileHelper.read( is ) ;
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

    }

    public TaggedComponent create( org.omg.CORBA.ORB orb,
        org.omg.IOP.TaggedComponent comp )
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)orb);
        org.omg.IOP.TaggedComponentHelper.write( os, comp ) ;
        InputStream is = (InputStream)(os.create_input_stream() ) ;
        // Skip the component ID: we just wrote it out above
        is.read_ulong() ;

        return (TaggedComponent)create( comp.tag, is ) ;
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        PrintWriter pw = new PrintWriter(baos);
        ex.printStackTrace(pw);
        pw.flush(); // NOTE: you must flush or baos will be empty.
        EncapsOutputStream encapsOutputStream =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)mediator.getBroker());
        encapsOutputStream.putEndian();
        encapsOutputStream.write_wstring(baos.toString());
        UnknownServiceContext serviceContext =
            new UnknownServiceContext(ExceptionDetailMessage.value,
                                      encapsOutputStream.toByteArray());
        serviceContexts.put(serviceContext);
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

        oktemp.write( id, os ) ;
    }

    public byte[] getBytes( org.omg.CORBA.ORB orb )
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)orb);
        write( os ) ;
        return os.toByteArray() ;
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.EncapsOutputStream

        return false ;
    }

    public org.omg.IOP.TaggedProfile getIOPProfile()
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(orb);
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream()) ;
        return org.omg.IOP.TaggedProfileHelper.read( is ) ;
    }
View Full Code Here
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.