Package org.apache.yoko.orb.CORBA

Examples of org.apache.yoko.orb.CORBA.OutputStream


        TypeCode objTypeCode = orb.get_primitive_tc(TCKind.tk_char);
        CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
        CorbaStreamable streamable = new CorbaStreamable(obj, objName);
       
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_char('c');
       
        InputStream iStream = oStream.create_input_stream();
        streamable._read(iStream);
        CorbaPrimitiveHandler streamableObj = (CorbaPrimitiveHandler)streamable.getObject();
        Object o = streamableObj.getValue();
       
        assertTrue(o instanceof Character);
View Full Code Here


        CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
        obj.setValueFromData("TestWString");
        CorbaStreamable streamable = new CorbaStreamable(obj, objName);
       
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        streamable._write(oStream);
       
        InputStream iStream = oStream.create_input_stream();
        String value = iStream.read_wstring();
        assertTrue(value.equals("TestWString"));
    }
View Full Code Here

        }
    }

    public void testWriteBoolean() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Boolean boolValue = new Boolean(true);
        writer.writeBoolean(boolValue);
       
        InputStream iStream = oStream.create_input_stream();
        boolean b = iStream.read_boolean();
        assertTrue(b == boolValue.booleanValue());
    }
View Full Code Here

        assertTrue(b == boolValue.booleanValue());
    }
   
    public void testWriteChar() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Character charValue = new Character('c');
        writer.writeChar(charValue);
       
        InputStream iStream = oStream.create_input_stream();
        char c = iStream.read_char();
        assertTrue(c == charValue.charValue());
    }
View Full Code Here

        assertTrue(c == charValue.charValue());
    }

    public void testWriteWChar() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Character wcharValue = new Character('w');
        writer.writeChar(wcharValue);
       
        InputStream iStream = oStream.create_input_stream();
        char wc = iStream.read_char();
        assertTrue(wc == wcharValue.charValue());
    }
View Full Code Here

        assertTrue(wc == wcharValue.charValue());
    }
   
    public void testWriteShort() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Short shortValue = new Short((short)-123);
        writer.writeShort(shortValue);
       
        InputStream iStream = oStream.create_input_stream();
        short s = iStream.read_short();
        assertTrue(s == shortValue.shortValue());
    }
View Full Code Here

        assertTrue(s == shortValue.shortValue());
    }
   
    public void testWriteUShort() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Integer ushortValue = new Integer(123);
        writer.writeUShort(ushortValue);
       
        InputStream iStream = oStream.create_input_stream();
        int us = iStream.read_ushort();
        assertTrue(us == ushortValue.intValue());
    }
View Full Code Here

        assertTrue(us == ushortValue.intValue());
    }
   
    public void testWriteLong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Integer longValue = new Integer(-1234567);
        writer.writeLong(longValue);
       
        InputStream iStream = oStream.create_input_stream();
        int l = iStream.read_long();
        assertTrue(l == longValue.intValue());
    }
View Full Code Here

        assertTrue(l == longValue.intValue());
    }
   
    public void testWriteULong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        BigInteger ulongValue = new BigInteger("1234567");
        writer.writeULong(ulongValue);
       
        InputStream iStream = oStream.create_input_stream();
        long ul = iStream.read_ulong();
        assertTrue(ul == ulongValue.longValue());
    }
View Full Code Here

        assertTrue(ul == ulongValue.longValue());
    }
   
    public void testWriteLongLong() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Long longlongValue = new Long("-12345678900");
        writer.writeLongLong(longlongValue);
       
        InputStream iStream = oStream.create_input_stream();
        long ll = iStream.read_longlong();
        assertTrue(ll == longlongValue.longValue());
    }
View Full Code Here

TOP

Related Classes of org.apache.yoko.orb.CORBA.OutputStream

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.