Package org.omg.CORBA

Examples of org.omg.CORBA.MARSHAL


                break;
            }
            default :
            {
                throw new MARSHAL( "Unknown GIOP minor: " + giop_minor );
            }
        }
    }
View Full Code Here


        super( orb, buffer );

        //check major version
        if( Messages.getGIOPMajor( buffer ) != 1 )
        {
            throw new MARSHAL
                ("Unknown GIOP major version: " + Messages.getGIOPMajor(buffer));
        }

        //although the attribute is renamed, this should work for 1.0
        //and 1.1/1.2
View Full Code Here

        super( orb, buf );

        //check message type
        if( buffer[7] != (byte) MsgType_1_1._LocateReply )
        {
            throw new MARSHAL("Not a reply!");
        }

        switch( giop_minor )
        {
            case 0 :
            {
                //GIOP 1.0 = GIOP 1.1, fall through
            }
            case 1 :
            {

                //GIOP 1.1
                LocateReplyHeader_1_0 hdr =
                    LocateReplyHeader_1_0Helper.read( this );

                rep_hdr =
                    new LocateReplyHeader_1_2( hdr.request_id,
                                               LocateStatusType_1_2.from_int( hdr.locate_status.value() ));
                break;
            }
            case 2 :
            {
                //GIOP 1.2
                rep_hdr = LocateReplyHeader_1_2Helper.read( this );

                break;
            }
            default :
            {
                throw new MARSHAL("Unknown GIOP minor version: " + giop_minor);
            }
        }
    }
View Full Code Here

        {
            if( next_frame != null && write_idx == next_frame.write_pos )
            {
                if ( ! (next_frame.length <= start + length - write_idx))
                {
                    throw new MARSHAL ("Deferred array does not fit");
                }

                // write a frame, i.e. a byte array
                out.write( next_frame.buf, next_frame.start, next_frame.length );
View Full Code Here

    public final void endEncapsulation()
    {
        if( encaps_start == -1 )
        {
            throw new MARSHAL("Too many end-of-encapsulations");
        }

        if( encaps_stack == null )
        {
            throw new MARSHAL("Internal Error - closeEncapsulation failed");
        }

        // determine the size of this encapsulation

        int encaps_size = pos - encaps_start;
View Full Code Here

            {
                write(baos, 0, index);
            }
            catch (IOException e)
            {
                throw new MARSHAL(e.toString());
            }
            return new CDRInputStream(orb(), baos.toByteArray());
        }

        byte[] result = new byte[index + 1];
View Full Code Here

    public final void write_char_array
       (final char[] value, final int offset, final int length)
    {
        if( value == null )
        {
            throw new MARSHAL("Cannot marshall null array.");
        }
        else if ( offset + length > value.length || length < 0 || offset < 0 )
        {
            throw new MARSHAL
                ("Cannot marshall as indices for array are out bounds.");
        }

        check( length );
View Full Code Here

        // written.
        int sizePosition;

        if( s == null )
        {
            throw new MARSHAL("Cannot marshall null string.");
        }

        if (codesetEnabled)
        {
            // in the worst case (UTF-8) a string char might take up to 3 bytes
View Full Code Here

    public final void write_wchar_array
       (final char[] value, final int offset, final int length)
    {
        if( value == null )
        {
            throw new MARSHAL("Null References");
        }

        check( length * 3 );

        for( int i = offset; i < offset+length; i++)
View Full Code Here

    public final void write_wstring(final String s)
    {
        if( s == null )
        {
            throw new MARSHAL("Null References");
        }

        //size ulong + no of bytes per char (max 3 if UTF-8) +
        //terminating NUL
        check( 4 + s.length() * 3 + 3, 4);
View Full Code Here

TOP

Related Classes of org.omg.CORBA.MARSHAL

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.