Package org.apache.yoko.orb.CORBA

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


    public void testReadWChar() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        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


    public void testReadOctet() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        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

    public void testReadShort() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        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

    public void testReadUShort() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_ushort((short)100);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Short ushortValue = reader.readUShort();
        assertTrue(ushortValue.shortValue() == (short)100);
    }
View Full Code Here

    public void testReadLong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_long(-100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Long longValue = reader.readLong();
        assertTrue(longValue.longValue() == -100000);
    }
View Full Code Here

    public void testReadULong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_ulong(100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        BigInteger ulongValue = reader.readULong();
        assertTrue(ulongValue.longValue() == 100000);
    }
View Full Code Here

    public void testReadLongLong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_longlong(1000000000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        BigInteger longlongValue = reader.readLongLong();
        assertTrue(longlongValue.longValue() == 1000000000);
    }
View Full Code Here

    public void testReadULongLong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_ulonglong(-1000000000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        BigInteger ulonglongValue = reader.readULongLong();
        assertTrue(ulonglongValue.longValue() == -1000000000);
    }
View Full Code Here

    public void testReadFloat() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_float((float)1234.56);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Float floatValue = reader.readFloat();
        assertTrue(floatValue.floatValue() == (float)1234.56);
    }
View Full Code Here

    public void testReadDouble() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_double(6543.21);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Double doubleValue = reader.readDouble();
        assertTrue(doubleValue.doubleValue() == 6543.21);
    }
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.