KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > ServiceDetailHelper


1 /*
2  * @(#)ServiceDetailHelper.java 1.12 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7  
8  /**
9  * The Helper for <tt>ServiceDetail</tt>. For more information on
10  * Helper files, see <a HREF="doc-files/generatedfiles.html#helper">
11  * "Generated Files: Helper Files"</a>.<P>
12  */

13
14 package org.omg.CORBA;
15
16
17 public abstract class ServiceDetailHelper {
18
19     public static void write(org.omg.CORBA.portable.OutputStream JavaDoc out, org.omg.CORBA.ServiceDetail JavaDoc that) {
20     out.write_ulong(that.service_detail_type);
21     {
22         out.write_long(that.service_detail.length);
23         out.write_octet_array(that.service_detail, 0, that.service_detail.length);
24     }
25     }
26     public static org.omg.CORBA.ServiceDetail JavaDoc read(org.omg.CORBA.portable.InputStream JavaDoc in) {
27         org.omg.CORBA.ServiceDetail JavaDoc that = new org.omg.CORBA.ServiceDetail JavaDoc();
28     that.service_detail_type = in.read_ulong();
29     {
30         int __length = in.read_long();
31         that.service_detail = new byte[__length];
32         in.read_octet_array(that.service_detail, 0, that.service_detail.length);
33     }
34         return that;
35     }
36     public static org.omg.CORBA.ServiceDetail JavaDoc extract(org.omg.CORBA.Any JavaDoc a) {
37     org.omg.CORBA.portable.InputStream JavaDoc in = a.create_input_stream();
38     return read(in);
39     }
40     public static void insert(org.omg.CORBA.Any JavaDoc a, org.omg.CORBA.ServiceDetail JavaDoc that) {
41     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream();
42     write(out, that);
43     a.read_value(out.create_input_stream(), type());
44     }
45     private static org.omg.CORBA.TypeCode JavaDoc _tc;
46     synchronized public static org.omg.CORBA.TypeCode JavaDoc type() {
47     int _memberCount = 2;
48     org.omg.CORBA.StructMember JavaDoc[] _members = null;
49     if (_tc == null) {
50         _members= new org.omg.CORBA.StructMember JavaDoc[2];
51         _members[0] = new org.omg.CORBA.StructMember JavaDoc(
52                              "service_detail_type",
53                              org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong),
54                              null);
55
56         _members[1] = new org.omg.CORBA.StructMember JavaDoc(
57                              "service_detail",
58                              org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_octet)),
59                              null);
60         _tc = org.omg.CORBA.ORB.init().create_struct_tc(id(), "ServiceDetail", _members);
61     }
62     return _tc;
63     }
64     public static String JavaDoc id() {
65     return "IDL:omg.org/CORBA/ServiceDetail:1.0";
66     }
67 }
68
Popular Tags