KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > boxedRMI > mark > seq1_AddDataHelper


1 package org.omg.boxedRMI.mark;
2
3
4 /**
5 * org/omg/boxedRMI/mark/seq1_AddDataHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.1"
7 * from W:/Geronimo/corba_container/tests/corba_idl/idl/Add.idl
8 * Monday, December 20, 2004 4:06:00 PM EST
9 */

10
11 public final class seq1_AddDataHelper implements org.omg.CORBA.portable.BoxedValueHelper JavaDoc
12 {
13   private static String JavaDoc _id = "RMI:[Lmark.AddData;:4165959D0B2418DD:88DF93646A6BEE62";
14
15   private static seq1_AddDataHelper _instance = new seq1_AddDataHelper ();
16
17
18   public seq1_AddDataHelper()
19   {
20   }
21
22   public static void insert (org.omg.CORBA.Any JavaDoc a, mark.AddData[] that)
23   {
24     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
25     a.type (type ());
26     write (out, that);
27     a.read_value (out.create_input_stream (), type ());
28   }
29
30   public static mark.AddData[] extract (org.omg.CORBA.Any JavaDoc a)
31   {
32     return read (a.create_input_stream ());
33   }
34
35   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
36   private static boolean __active = false;
37   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
38   {
39     if (__typeCode == null)
40     {
41       synchronized (org.omg.CORBA.TypeCode JavaDoc.class)
42       {
43         if (__typeCode == null)
44         {
45           if (__active)
46           {
47             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
48           }
49           __active = true;
50           __typeCode = mark.AddDataHelper.type ();
51           __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
52           __typeCode = org.omg.CORBA.ORB.init ().create_value_box_tc (_id, "seq1_AddData", __typeCode);
53           __active = false;
54         }
55       }
56     }
57     return __typeCode;
58   }
59
60   public static String JavaDoc id ()
61   {
62     return _id;
63   }
64
65   public static mark.AddData[] read (org.omg.CORBA.portable.InputStream JavaDoc istream)
66   {
67     if (!(istream instanceof org.omg.CORBA_2_3.portable.InputStream JavaDoc)) {
68       throw new org.omg.CORBA.BAD_PARAM JavaDoc(); }
69     return (mark.AddData[]) ((org.omg.CORBA_2_3.portable.InputStream JavaDoc) istream).read_value (_instance);
70   }
71
72   public java.io.Serializable JavaDoc read_value (org.omg.CORBA.portable.InputStream JavaDoc istream)
73   {
74     mark.AddData[] tmp;
75     int _len0 = istream.read_long ();
76     tmp = new mark.AddData[_len0];
77     for (int _o1 = 0;_o1 < tmp.length; ++_o1)
78       tmp[_o1] = mark.AddDataHelper.read (istream);
79     return (java.io.Serializable JavaDoc) tmp;
80   }
81
82   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, mark.AddData[] value)
83   {
84     if (!(ostream instanceof org.omg.CORBA_2_3.portable.OutputStream JavaDoc)) {
85       throw new org.omg.CORBA.BAD_PARAM JavaDoc(); }
86     ((org.omg.CORBA_2_3.portable.OutputStream JavaDoc) ostream).write_value (value, _instance);
87   }
88
89   public void write_value (org.omg.CORBA.portable.OutputStream JavaDoc ostream, java.io.Serializable JavaDoc value)
90   {
91     if (!(value instanceof mark.AddData[])) {
92       throw new org.omg.CORBA.MARSHAL JavaDoc(); }
93     mark.AddData[] valueType = (mark.AddData[]) value;
94     ostream.write_long (valueType.length);
95     for (int _i0 = 0;_i0 < valueType.length; ++_i0)
96       mark.AddDataHelper.write (ostream, valueType[_i0]);
97   }
98
99   public String JavaDoc get_id ()
100   {
101     return _id;
102   }
103
104 }
105
Popular Tags