KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)RepositoryIdHelper.java 1.9 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 package org.omg.CORBA;
8
9
10 /**
11 * The Helper for <tt>RepositoryId</tt>. For more information on
12 * Helper files, see <a HREF="doc-files/generatedfiles.html#helper">
13 * "Generated Files: Helper Files"</a>.<P>
14
15 * org/omg/CORBA/RepositoryIdHelper.java
16 * Generated by the IDL-to-Java compiler (portable), version "3.0"
17 * from ir.idl
18 * 03 June 1999 11:33:43 o'clock GMT+00:00
19 */

20
21 abstract public class RepositoryIdHelper
22 {
23   private static String JavaDoc _id = "IDL:omg.org/CORBA/RepositoryId:1.0";
24
25   public static void insert (org.omg.CORBA.Any JavaDoc a, String JavaDoc that)
26   {
27     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
28     a.type (type ());
29     write (out, that);
30     a.read_value (out.create_input_stream (), type ());
31   }
32
33   public static String JavaDoc extract (org.omg.CORBA.Any JavaDoc a)
34   {
35     return read (a.create_input_stream ());
36   }
37
38   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
39   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
40   {
41     if (__typeCode == null)
42     {
43       __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
44       __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", __typeCode);
45     }
46     return __typeCode;
47   }
48
49   public static String JavaDoc id ()
50   {
51     return _id;
52   }
53
54   public static String JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
55   {
56     String JavaDoc value = null;
57     value = istream.read_string ();
58     return value;
59   }
60
61   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, String JavaDoc value)
62   {
63     ostream.write_string (value);
64   }
65
66 }
67
Popular Tags