Package com.sun.corba.se.impl.encoding

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


****************************************************************************/

    public synchronized org.omg.CORBA.portable.OutputStream create_output_stream()
    {
        checkShutdownState();
        return new EncapsOutputStream(this);
    }
View Full Code Here


        // Note that this is NOT an encapsulation: do not marshal
        // the endianness flag.  However, the length is required.
        // Note that this cannot be accomplished with a codec!

        // Use the byte order of the given stream
        OutputStream encapsulatedOS = new EncapsOutputStream( (ORB)os.orb(),
            ((CDROutputStream)os).isLittleEndian() ) ;

        okeyTemplate.write( id, encapsulatedOS ) ;
        EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;
View Full Code Here

        return result ;
    }

    public org.omg.IOP.TaggedProfile getIOPProfile()
    {
        EncapsOutputStream os = new EncapsOutputStream( 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

                throw stdWrapper.invalidServiceContextId() ;

            // Convert the "core" service context to an
            // "IOP" ServiceContext by writing it to a
            // CDROutputStream and reading it back.
            EncapsOutputStream out = new EncapsOutputStream(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

        org.omg.IOP.ServiceContext service_context,
        boolean replace )
    {
        int id = 0 ;
        // Convert IOP.service_context to core.ServiceContext:
        EncapsOutputStream outputStream = new EncapsOutputStream(
            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

        oktemp.write( id, os ) ;
    }

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

    protected void set_parameters (String params[], Properties props) {
    }

    public OutputStream create_output_stream() {
        return new EncapsOutputStream(this);
    }
View Full Code Here

        return false ;
    }

    public org.omg.IOP.TaggedProfile getIOPProfile()
    {
        EncapsOutputStream os = new EncapsOutputStream( orb ) ;
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream()) ;
        return org.omg.IOP.TaggedProfileHelper.read( is ) ;
    }
View Full Code Here

    }

    public TaggedComponent create( org.omg.CORBA.ORB orb,
        org.omg.IOP.TaggedComponent comp )
    {
        EncapsOutputStream os = new EncapsOutputStream( (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

    {
        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 =
            new EncapsOutputStream((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

TOP

Related Classes of com.sun.corba.se.impl.encoding.EncapsOutputStream

Copyright © 2018 www.massapicom. 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.