Package org.jacorb.orb

Examples of org.jacorb.orb.CDRInputStream


                   member.to_any().create_input_stream());

           org.omg.CORBA.Any out_any = orb.create_any();

           out_any.type( type() );
           final CDRInputStream in = new CDRInputStream( orb, out.getBufferCopy());

           try
           {
               out_any.read_value( in, type());
               return out_any;
           }
           finally
           {
               in.close();
           }
       }
       finally
       {
           out.close();
View Full Code Here


       {
           out.write_long( enumValue );

           org.omg.CORBA.Any out_any = orb.create_any();
           out_any.type(type());
           final CDRInputStream in = new CDRInputStream(orb, out.getBufferCopy());

           try
           {
               out_any.read_value( in, type());
               return out_any;
           }
           finally
           {
               in.close();
           }
       }
       finally
       {
           out.close();
View Full Code Here

           {
               out.write_value( elementType,
                       members[i].create_input_stream());
           }

           final CDRInputStream in = new CDRInputStream(orb, out.getBufferCopy());
           try
           {
               out_any.read_value( in, type());
               return out_any;
           }
           finally
           {
               in.close();
           }
       }
       finally
       {
           out.close();
View Full Code Here

        for( int i = 0; i < contexts.length; i++ )
        {
            if( contexts[i].context_id == TAG_CODE_SETS.value )
            {
                // TAG_CODE_SETS found, demarshall
                CDRInputStream is = new CDRInputStream( null, contexts[i].context_data );
                is.openEncapsulatedArray();

                return CodeSetContextHelper.read( is );
            }
        }
View Full Code Here

        }
    }

    private BiDirIIOPServiceContext readBiDirContext(ServiceContext ctx)
    {
        final CDRInputStream cdr_in =
            new CDRInputStream( orb, ctx.context_data );

        try
        {
            cdr_in.openEncapsulatedArray();

            return BiDirIIOPServiceContextHelper.read(cdr_in);
        }
        finally
        {
            cdr_in.close();
        }
    }
View Full Code Here

    // implementation of org.omg.IOP.CodecOperations interface

    public Any decode(byte[] data)
        throws FormatMismatch
    {
        final CDRInputStream in = new CDRInputStream(orb, data);

        try
        {
            in.setGIOPMinor( giopMinor );

            in.openEncapsulatedArray();
            Any result = in.read_any();

            //not necessary, since stream is never used again
            //in.closeEncapsulation();

            return result;
        }
        finally
        {
            in.close();
        }
    }
View Full Code Here


    public Any decode_value(byte[] data, TypeCode tc)
        throws FormatMismatch, TypeMismatch
    {
        final CDRInputStream in = new CDRInputStream(orb, data);

        try
        {
            in.setGIOPMinor( giopMinor );

            in.openEncapsulatedArray();
            Any result = orb.create_any();
            result.read_value(in, tc);

            //not necessary, since stream is never used again
            //in.closeEncasupaltion();

            return result;
        }
        finally
        {
            in.close();
        }
    }
View Full Code Here

    private void calcTimingPolicies()
    {
        ServiceContext ctx = inputStream.getServiceContext(INVOCATION_POLICIES.value);
        if (ctx != null)
        {
            final CDRInputStream input = new CDRInputStream (null, ctx.context_data);

            try
            {
                input.openEncapsulatedArray();
                PolicyValue[] policy = PolicyValueSeqHelper.read (input);
                for (int i=0; i < policy.length; i++)
                {
                    if (policy[i].ptype == REQUEST_START_TIME_POLICY_TYPE.value)
                    {
                        requestStartTime = Time.fromCDR (policy[i].pvalue);
                    }
                    else if (policy[i].ptype == REQUEST_END_TIME_POLICY_TYPE.value)
                    {
                        requestEndTime = Time.fromCDR (policy[i].pvalue);
                    }
                    else if (policy[i].ptype == REPLY_END_TIME_POLICY_TYPE.value)
                    {
                        replyEndTime = Time.fromCDR (policy[i].pvalue);
                    }
                }
            }
            finally
            {
                input.close();
            }
        }
    }
View Full Code Here

    // implementation of org.omg.IOP.CodecOperations interface

    public Any decode(byte[] data)
        throws FormatMismatch
    {
        final CDRInputStream in = new CDRInputStream(orb, data);

        try
        {
            in.openEncapsulatedArray();
            Any result = in.read_any();

            // not necessary to end encapsulation, since stream is never used again

            return result;
        }
        finally
        {
            in.close();
        }
    }
View Full Code Here


    public Any decode_value(byte[] data, TypeCode tc)
        throws FormatMismatch, TypeMismatch
    {
        final CDRInputStream in = new CDRInputStream(orb, data);

        try
        {
            in.openEncapsulatedArray();
            Any result = orb.create_any();
            result.read_value(in, tc);

            // not necessary to end encapsulation, since stream is never used again

            return result;
        }
        finally
        {
            in.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.jacorb.orb.CDRInputStream

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.