Package org.omg.CORBA.portable

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


        writer.writeStruct(obj);
       
        InputStream iStream = oStream.create_input_stream();
        int readMember1 = iStream.read_long();
        assertTrue(readMember1 == member1);
        String readMember2 = iStream.read_string();
        assertTrue(readMember2.equals(member2));
        boolean readMember3 = iStream.read_boolean();
        assertTrue(readMember3 == member3);
    }
   
View Full Code Here


        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
        writer.writeException(obj);

        InputStream iStream = oStream.create_input_stream();
       
        String readId = iStream.read_string();
        assertTrue(readId.equals(reposID));
        short readCode = iStream.read_short();
        assertTrue(readCode == code);
        String readMessage = iStream.read_string();
        assertTrue(readMessage.equals(message));
View Full Code Here

       
        String readId = iStream.read_string();
        assertTrue(readId.equals(reposID));
        short readCode = iStream.read_short();
        assertTrue(readCode == code);
        String readMessage = iStream.read_string();
        assertTrue(readMessage.equals(message));
    }
   
    @Test
    public void testWriteObject() throws IOException {
View Full Code Here

        SystemException exception = null;
        Any any = ri.received_exception();
        InputStream strm = any.create_input_stream();
        String repId = ri.received_exception_id();
        strm.read_string(); // read repId
        int minorCode = strm.read_long(); // read minorCode
        CompletionStatus completionStatus = // read completionStatus
            CompletionStatus.from_int(strm.read_long());
        if (repId.indexOf("UNKNOWN") != -1) { // user exception ?
      if (minorCode == 1) { // read minorCode
View Full Code Here

    }

    public void send_exception(ServerRequestInfo ri) throws ForwardRequest {
        Any any = ri.sending_exception();
        InputStream strm = any.create_input_stream();
        strm.read_string(); // repId
        strm.read_long(); // minorCode
        CompletionStatus completionStatus =
            CompletionStatus.from_int(strm.read_long());

        processServerSendPoint(ri, completionStatus);
View Full Code Here

        SystemException exception = null;
        Any any = ri.received_exception();
        InputStream strm = any.create_input_stream();
        String repId = ri.received_exception_id();
        strm.read_string(); // read repId
        int minorCode = strm.read_long(); // read minorCode
        CompletionStatus completionStatus = // read completionStatus
            CompletionStatus.from_int(strm.read_long());
        if (repId.indexOf("UNKNOWN") != -1) { // user exception ?
      if (minorCode == 1) { // read minorCode
View Full Code Here

    }

    public void send_exception(ServerRequestInfo ri) throws ForwardRequest {
        Any any = ri.sending_exception();
        InputStream strm = any.create_input_stream();
        strm.read_string(); // repId
        strm.read_long(); // minorCode
        CompletionStatus completionStatus =
            CompletionStatus.from_int(strm.read_long());

        processServerSendPoint(ri, completionStatus);
View Full Code Here

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

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

    public void testRead() throws IOException
    {
        os.write_string("thing-one");
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

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.