Package org.apache.yoko.orb.CORBA

Examples of org.apache.yoko.orb.CORBA.OutputStream.create_input_stream()


       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Float floatValue = new Float((float)123456.78);
        writer.writeFloat(floatValue);
       
        InputStream iStream = oStream.create_input_stream();
        float f = iStream.read_float();
        assertTrue(f == floatValue.floatValue());
    }
   
    public void testWriteDouble() {
View Full Code Here


       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Double doubleValue = new Double(987654.321);
        writer.writeDouble(doubleValue);
       
        InputStream iStream = oStream.create_input_stream();
        double d = iStream.read_double();
        assertTrue(d == doubleValue.doubleValue());
    }
   
    public void testWriteString() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        String stringValue = new String("String");
        writer.writeString(stringValue);
       
        InputStream iStream = oStream.create_input_stream();
        String s = iStream.read_string();
        assertTrue(s.equals(stringValue));
    }

    public void testWriteWString() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        String wstringValue = new String("String");
        writer.writeWString(wstringValue);
       
        InputStream iStream = oStream.create_input_stream();
        String s = iStream.read_wstring();
        assertTrue(s.equals(wstringValue));
    }
   
    public void testWriteArray() {
View Full Code Here

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        writer.writeArray(obj);
       
        InputStream iStream = oStream.create_input_stream();
        for (int i = 0; i < data.length; ++i) {
            int val = iStream.read_long();
            assertTrue(val == data[i]);
        }
    }
View Full Code Here

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer =  new CorbaObjectWriter(oStream);
        writer.writeSequence(obj);
       
        InputStream iStream = oStream.create_input_stream();
        int length = iStream.read_long();
        for (int i = 0; i < length; ++i) {
            String val = iStream.read_string();
            assertTrue(val.equals(data[i]));
        }
View Full Code Here

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        writer.writeStruct(obj);
       
        InputStream iStream = oStream.create_input_stream();
        int readMember1 = iStream.read_long();
        assertTrue(readMember1 == member1);
        String readMember2 = iStream.read_string();
        assertTrue(readMember2.equals(member2));
        boolean readMember3 = iStream.read_boolean();
View Full Code Here

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        writer.writeException(obj);

        InputStream iStream = oStream.create_input_stream();
       
        String readId = iStream.read_string();
        assertTrue(readId.equals(reposID));
        short readCode = iStream.read_short();
        assertTrue(readCode == code);
View Full Code Here

        DynAny_impl impl = (DynAny_impl) dyn_any;
        org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer();
        OutputStream out = new OutputStream(buf);
        out._OB_ORBInstance(orbInstance_);
        impl._OB_marshal(out);
        org.omg.CORBA.portable.InputStream in = out.create_input_stream();
        _OB_unmarshal((InputStream) in);

        notifyParent();
    }
View Full Code Here

        if (dynValueWriter != null)
            _OB_marshal(out, dynValueWriter);
        else
            _OB_marshal(out);

        org.omg.CORBA.portable.InputStream in = out.create_input_stream();
        Any result = new Any(orbInstance_, type_, in);
        return result;
    }

    public synchronized boolean equal(org.omg.DynamicAny.DynAny dyn_any) {
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.