Package org.apache.yoko.orb.CORBA

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


       
        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


       
        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());
    }
   
    public void testWriteChar() {
View Full Code Here

       
        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());
    }

    public void testWriteWChar() {
View Full Code Here

       
        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());
    }
   
    public void testWriteShort() {
View Full Code Here

       
        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());
    }
   
    public void testWriteUShort() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Short ushortValue = new Short((short)123);
        writer.writeUShort(ushortValue);
       
        InputStream iStream = oStream.create_input_stream();
        short us = iStream.read_ushort();
        assertTrue(us == ushortValue.shortValue());
    }
   
    public void testWriteLong() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        Long longValue = new Long(-1234567);
        writer.writeLong(longValue);
       
        InputStream iStream = oStream.create_input_stream();
        long l = iStream.read_long();
        assertTrue(l == longValue.longValue());
    }
   
    public void testWriteULong() {
View Full Code Here

       
        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());
    }
   
    public void testWriteLongLong() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        BigInteger longlongValue = new BigInteger("-12345678900");
        writer.writeLongLong(longlongValue);
       
        InputStream iStream = oStream.create_input_stream();
        long ll = iStream.read_longlong();
        assertTrue(ll == longlongValue.longValue());
    }
   
    public void testWriteULongLong() {
View Full Code Here

       
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        BigInteger ulonglongValue = new BigInteger("12345678900");
        writer.writeULongLong(ulonglongValue);
       
        InputStream iStream = oStream.create_input_stream();
        long ul = iStream.read_ulonglong();
        assertTrue(ul == ulonglongValue.longValue());
    }
   
    public void testWriteFloat() {
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.