Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream.create_input_stream()


        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


    @Test
    public void testReadBoolean() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_boolean(true);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Boolean boolValue = reader.readBoolean();
        assertTrue(boolValue.booleanValue());
    }
View Full Code Here

    @Test
    public void testReadChar() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_char('c');
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Character charValue = reader.readChar();
        assertTrue(charValue.charValue() == 'c');
    }
View Full Code Here

    @Test
    public void testReadWChar() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_wchar('w');
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Character wcharValue = reader.readWChar();
        assertTrue(wcharValue.charValue() == 'w');
    }
View Full Code Here

    @Test
    public void testReadOctet() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_octet((byte)27);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Byte octetValue = reader.readOctet();
        assertTrue(octetValue.byteValue() == (byte)27);
    }
View Full Code Here

    @Test
    public void testReadShort() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_short((short)-100);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Short shortValue = reader.readShort();
        assertTrue(shortValue.shortValue() == (short)-100);
    }
View Full Code Here

    @Test
    public void testReadUShort() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_ushort((short)100);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Integer ushortValue = reader.readUShort();
        assertTrue(ushortValue.intValue() == 100);
    }
View Full Code Here

    @Test
    public void testReadLong() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(-100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Integer longValue = reader.readLong();
        assertTrue(longValue.intValue() == -100000);
    }
View Full Code Here

    @Test
    public void testReadULong() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_ulong(100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        long ulongValue = reader.readULong();
        assertTrue(ulongValue == 100000);
    }
View Full Code Here

    @Test
    public void testReadLongLong() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_longlong(1000000000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Long longlongValue = reader.readLongLong();
        assertTrue(longlongValue.longValue() == 1000000000);
    }
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.