Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream.write_long()


    @Test
    public void testReadSequence() {
        String data[] = {"one", "one", "two", "three", "five", "eight", "thirteen", "twenty-one"};
       
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(data.length);
        for (int i = 0; i < data.length; ++i) {
            oStream.write_string(data[i]);
        }

        InputStream iStream = oStream.create_input_stream();
View Full Code Here


        // }
        int member1 = 12345;
        String member2 = "54321";
        boolean member3 = true;
       
        oStream.write_long(member1);
        oStream.write_string(member2);
        oStream.write_boolean(member3);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
View Full Code Here

    public void testReadEnum() {
        OutputStream oStream = orb.create_output_stream();
       
        // create the following enum
        // enum { RED, GREEN, BLUE };
        oStream.write_long(1);
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String[] enums = {"RED", "GREEN", "BLUE" };
        Enum enumType = new Enum();
View Full Code Here

    }
   
    @Test
    public void testReadLong() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(-100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Integer longValue = reader.readLong();
View Full Code Here

    }
   
    @Test
    public void testReadLong() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(-100000);
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Integer longValue = reader.readLong();
View Full Code Here

    @Test
    public void testReadSequence() {
        String data[] = {"one", "one", "two", "three", "five", "eight", "thirteen", "twenty-one"};
       
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(data.length);
        for (int i = 0; i < data.length; ++i) {
            oStream.write_string(data[i]);
        }

        InputStream iStream = oStream.create_input_stream();
View Full Code Here

        // }
        int member1 = 12345;
        String member2 = "54321";
        boolean member3 = true;
       
        oStream.write_long(member1);
        oStream.write_string(member2);
        oStream.write_boolean(member3);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
View Full Code Here

    public void testReadEnum() {
        OutputStream oStream = orb.create_output_stream();
       
        // create the following enum
        // enum { RED, GREEN, BLUE };
        oStream.write_long(1);
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String[] enums = {"RED", "GREEN", "BLUE" };
        Enum enumType = new Enum();
View Full Code Here

    public int echo(int arg0) throws RemoteException {
        try {
            org.omg.CORBA.portable.InputStream in = null;
            try {
                OutputStream out = _request("echo", true);
                out.write_long(arg0);
                in = _invoke(out);
                return in.read_long();
            } catch (ApplicationException ex) {
                in = ex.getInputStream();
                String id = in.read_string();
View Full Code Here

                (org.omg.CORBA_2_3.portable.InputStream) _in;
            if (method.equals("echo")) {
                int arg0 = in.read_long();
                int result = target.echo(arg0);
                OutputStream out = reply.createReply();
                out.write_long(result);
                return out;
            }
            throw new BAD_OPERATION();
        } catch (SystemException ex) {
            throw ex;
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.