Package org.omg.CORBA

Examples of org.omg.CORBA.Any.read_value()


                }
                case TCKind._tk_union: {
                    Any myDiscriminator = orb.create_any();
                    Any otherDiscriminator = orb.create_any();
                    myDiscriminator.read_value(myStream, realType.discriminator_type());
                    otherDiscriminator.read_value(otherStream, realType.discriminator_type());

                    if ( ! myDiscriminator.equal(otherDiscriminator)) {
                        return false;
                    }
                    TypeCodeImpl realTypeCodeImpl = TypeCodeImpl.convertToNative(orb, realType);
View Full Code Here


    // and returns it wrapped into a new Any
    public Any extractAny(TypeCode memberType, ORB orb) {
        Any returnValue = orb.create_any();
        OutputStream out = returnValue.create_output_stream();
        TypeCodeImpl.convertToNative(orb, memberType).copy((InputStream)stream, out);
        returnValue.read_value(out.create_input_stream(), memberType);
        return returnValue;
    }

    // This method could very well be moved into TypeCodeImpl or a common utility class,
    // but is has to be in this package.
View Full Code Here

    // but is has to be in this package.
    static public Any extractAnyFromStream(TypeCode memberType, InputStream input, ORB orb) {
        Any returnValue = orb.create_any();
        OutputStream out = returnValue.create_output_stream();
        TypeCodeImpl.convertToNative(orb, memberType).copy(input, out);
        returnValue.read_value(out.create_input_stream(), memberType);
        return returnValue;
    }

    // There is no other way for DynAnys to find out whether the Any is initialized.
    public boolean isInitialized() {
View Full Code Here

                    // Since we dont have the actual user exception
                    // class, the spec says we have to create an
                    // UnknownUserException and put it in the
                    // environment.
                    Any eany = orb.create_any();
                    eany.read_value(is, (TypeCode)tc);

                    return new UnknownUserException(eany);
                }
            }
        } catch (Exception b) {
View Full Code Here

            // read off.
            ex.printStackTrace();
        }

        // read off the value of the any.
        any.read_value(parent, tc);

        return any;
    }

    public Principal read_Principal() {
View Full Code Here

                //Any tmp = new AnyImpl(_orb);
                Any tmp =  ((CDRInputStream)src).orb().create_any();
                TypeCodeImpl t = new TypeCodeImpl((ORB)dst.orb());
                t.read_value((org.omg.CORBA_2_3.portable.InputStream)src);
                t.write_value((org.omg.CORBA_2_3.portable.OutputStream)dst);
                tmp.read_value(src, t);
                tmp.write_value(dst);
                break;
            }

        case TCKind._tk_TypeCode:
View Full Code Here

            // We can be sure that the whole typecode encapsulation has been
            // read off.
            dprintThrowable(ex);
        }
        // read off the value of the any
        any.read_value(parent, tc);

        return any;
    }

    public org.omg.CORBA.Object read_Object() {
View Full Code Here

            // We can be sure that the whole typecode encapsulation has been
            // read off.
            dprintThrowable(ex);
        }
        // read off the value of the any
        any.read_value(parent, tc);

        return any;
    }

    public org.omg.CORBA.Object read_Object() {
View Full Code Here

        if (containedType != null) {
            a.type(containedType.getTypeCode());
            OutputStream os = a.create_output_stream();
            CorbaObjectWriter writer = new CorbaObjectWriter(os);
            writer.write(containedType);
            a.read_value(os.create_input_stream(), containedType.getTypeCode());
        }
        stream.write_any(a);
    }

    // -- complex types --
View Full Code Here

        if (containedType != null) {
            a.type(containedType.getTypeCode());
            OutputStream os = a.create_output_stream();
            CorbaObjectWriter writer = new CorbaObjectWriter(os);
            writer.write(containedType);
            a.read_value(os.create_input_stream(), containedType.getTypeCode());
        }
        stream.write_any(a);
    }

    // -- complex types --
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.