Package org.jacorb.orb

Examples of org.jacorb.orb.CDROutputStream.create_input_stream()


    public void testStringMayNotBeSizeZero()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(0);

        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here


    public void testEmptyStringMustBeTerminated()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(1);

        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here

    public void testEmptyStringMustBeTerminatedWithZeroOctet()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(1);
        out.write_octet((byte) 1);
        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here

    public void testStringMayNotBeSizeZero()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(0);

        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here

    public void testEmptyStringMustBeTerminated()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(1);

        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here

    public void testEmptyStringMustBeTerminatedWithZeroOctet()
    {
        CDROutputStream out = (CDROutputStream) orb.create_output_stream();
        out.write_long(1);
        out.write_octet((byte) 1);
        InputStream in = out.create_input_stream();

        try
        {
            in.read_string();
            fail();
View Full Code Here

        System.arraycopy(bufferCopy, 4, toMatch, 0, sourceMatch.length);

        assertTrue("Buffer size should be 9",
                bufferCopy.length == (4 + 1 + length(source)));

        CDRInputStream cdrin = (CDRInputStream) cdrOutputStream.create_input_stream();
        String result = cdrin.read_string();
        assertTrue("Strings should match", source.equals(result));

        Assert.assertArrayEquals(sourceMatch, result.getBytes("utf-8"));
        Assert.assertArrayEquals(sourceMatch, toMatch);
View Full Code Here

        cdr.write_string(null);
        cdr.write_boolean(true);
        cdr.write_string(null);
        cdr.write_string("TEST");

        CDRInputStream read = (CDRInputStream)cdr.create_input_stream();

        assertEquals (null, read.read_string());
        read.read_boolean();
        assertEquals (null, read.read_string());
        assertEquals ("TEST", read.read_string());
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.