Package org.omg.CORBA

Examples of org.omg.CORBA.MARSHAL


            int length = in.read_ulong();

            if (in.available() < length)
            {
                throw new MARSHAL("Unable to extract object key. Only " + in.available() + " available and trying to assign " + length);
            }

            objectKey = new byte[length];
            in.read_octet_array(objectKey, 0, length);
View Full Code Here


                return ((org.omg.CORBA.portable.CustomValue)implObj);
            }
            else
            {
                throw new MARSHAL ("Unknown Value type " + implObj);
            }
        }
View Full Code Here

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

        EncapsInfo ei = (EncapsInfo)encaps_stack.pop();
        littleEndian = ei.littleEndian;
        int size = ei.size;
View Full Code Here

            // Technically only valid values are 0 (false) and 1 (true)
            // however some ORBs send values other than 1 for true.
            return true;
        }

        throw new MARSHAL("Unexpected boolean value: " + value
                + " pos: " + pos + " index: " + index);
    }
View Full Code Here

            {
                value[j] = false;
            }
            else
            {
                throw new MARSHAL ("Unexpected boolean value: " + bb
                                   + " pos: " + pos + " index: " + index);
            }
        }
    }
View Full Code Here

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

        handle_chunking();
View Full Code Here

            index++;
        }

        if (digits != -1 && (outBuffer.length() != digits))
        {
            throw new MARSHAL("unexpected number of digits: expected " + digits + " got " + outBuffer.length() + " " + outBuffer);
        }

        return c;
    }
View Full Code Here

    public final org.omg.CORBA.Object read_Object()
    {
        if (! (orb instanceof org.jacorb.orb.ORB))
        {
            throw new MARSHAL
                ( "Cannot use the singleton ORB to receive object references, "
                       + "please initialize a full ORB instead.");
        }

        handle_chunking();
View Full Code Here

                {
                    stub = (org.omg.CORBA.portable.ObjectImpl)clazz.newInstance();
                }
                catch (InstantiationException e)
                {
                    throw new MARSHAL("Exception in stub instantiation: " + e);
                }
                catch (IllegalAccessException e)
                {
                    throw new MARSHAL("Exception in stub instantiation: " + e);
                }
                stub._set_delegate(
                     ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
                return stub;
            }
View Full Code Here

        // read size (#bytes)
        int size = _read4int( littleEndian, buffer, pos);

        if (size < 1)
        {
            throw new MARSHAL("invalid string size: " + size);
        }

        int start = pos + 4;

        index += (size + 4);
        pos += (size + 4);

        final int stringTerminatorPosition = start + size -1;

        if (buffer.length < stringTerminatorPosition + 1)
        {
            throw new MARSHAL("buffer too small");
        }

        if ((buffer[stringTerminatorPosition] == 0))
        {
            size --;
        }
        else
        {
            throw new MARSHAL("unexpected string terminator value " + Integer.toHexString(buffer[stringTerminatorPosition]) + " at buffer index " + stringTerminatorPosition);
        }

        // Optimize for empty strings.
        if (size == 0)
        {
            return "";
        }

        if(start + size > buffer.length)
        {
            final String message = "Size (" + size + ") invalid for string extraction from buffer length of " + buffer.length + " from position " + start;
            if (logger.isDebugEnabled())
            {
                logger.debug(message);
            }
            throw new MARSHAL(message);
        }

        if (codesetEnabled)
        {
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.