Package org.jacorb.orb

Examples of org.jacorb.orb.CDRInputStream.read_char()


    public void testDefaultEncodingChar() throws Exception
    {
        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
View Full Code Here


    {
        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
View Full Code Here

        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
        stream.read_char_array( buffer, 1, 3 );
View Full Code Here

                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
        stream.read_char_array( buffer, 1, 3 );
        assertEquals( "char array", "wxyz", new String( buffer ) );
View Full Code Here

        CDRInputStream stream = new CDRInputStream( orb, codedText );
        selectCodeSets( stream, "UTF8", "UTF8" );
        stream.setGIOPMinor( 1 );
        assertEquals( "sstring value", "asdf", stream.read_string() );

        assertEquals( "char 1", 'x', stream.read_char() );
    }


    /**
     * Verifies that the UTF-8 works for wchar, wchar arrays, and wstrings. Reading the wstring
View Full Code Here

    public void testDefaultEncodingChar() throws Exception
    {
        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
View Full Code Here

    {
        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
View Full Code Here

        byte[] codedText = {'a', 's', 'd', 'f', 'x', 'y', 'z', '*',
                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
        stream.read_char_array( buffer, 1, 3 );
View Full Code Here

                0, 0, 0, 5, 'C', 'A', 'F', 'E', 0};
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        assertEquals( "char 1", 'a', stream.read_char() );
        assertEquals( "char 2", 's', stream.read_char() );
        assertEquals( "char 3", 'd', stream.read_char() );
        assertEquals( "char 4", 'f', stream.read_char() );

        char[] buffer = new char[4];
        buffer[0] = 'w';
        stream.read_char_array( buffer, 1, 3 );
        assertEquals( "char array", "wxyz", new String( buffer ) );
View Full Code Here

        };
        CDRInputStream stream = new CDRInputStream( orb, codedText );
        selectCodeSets( stream, "UTF8", "UTF8" );
        stream.setGIOPMinor( 1 );
        assertEquals( "sstring value", "asdf", stream.read_string() );
        assertEquals( "char 1", 'x', stream.read_char() );
        stream.close();
    }


    /**
 
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.