Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.InputStream.read_string()


    {
        String pre = "abc";
        os.write_string(pre);
        InputStream is = os.create_input_stream();
        assertTrue(is.available() > 0);
        String post = is.read_string();
        assertEquals(pre, post);
    }

    @Test
    public void testWString() throws IOException
View Full Code Here


        assertTrue(readAmount > 0);

        os = orb.create_output_stream();
        os.write_octet_array(buf, 0, buf.length);
        InputStream is2 = os.create_input_stream();
        assertEquals("abcde", is2.read_string());
    }

    @Test
    public void testRead() throws IOException
    {
View Full Code Here

        os.write_long(123);
        os.write_string("thing-two");

        InputStream is = os.create_input_stream();
        assertTrue(is.available() > 0);
        assertEquals("thing-one", is.read_string());
        assertEquals(123, is.read_long());

        assertTrue(is.available() > 0);
        byte[] buf = new byte[is.available()];
        int readAmount = is.read(buf);
View Full Code Here

        assertTrue(readAmount > 0);

        os = orb.create_output_stream();
        os.write_octet_array(buf, 0, buf.length);
        InputStream is2 = os.create_input_stream();
        assertEquals("thing-two", is2.read_string());
    }

    @Test
    public void testMultiple() throws IOException
    {
View Full Code Here

        assertEquals(is.read_double(), 1.234, 0.001);
        assertEquals(is.read_float(), 2.345f, 0.001f);
        assertEquals(is.read_long(), 987);
        assertEquals(is.read_longlong(), 876);
        assertEquals(is.read_short(), (short)13);
        assertEquals(is.read_string(), "hi");
        assertEquals(is.read_ulong(), 765);
        assertEquals(is.read_ulonglong(), 567);
        assertEquals(is.read_ushort(), (short)23);
        assertEquals(is.read_wchar(), 'b');
        assertEquals(is.read_wstring(), "bye");
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.