1. /*
  2. * @(#)IdentifierHelper.java 1.4 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package org.omg.CORBA;
  11. /**
  12. * org/omg/CORBA/IdentifierHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from ir.idl
  15. * 03 June 1999 11:33:42 o'clock GMT+00:00
  16. */
  17. abstract public class IdentifierHelper
  18. {
  19. private static String _id = "IDL:omg.org/CORBA/Identifier:1.0";
  20. public static void insert (org.omg.CORBA.Any a, String that)
  21. {
  22. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  23. a.type (type ());
  24. write (out, that);
  25. a.read_value (out.create_input_stream (), type ());
  26. }
  27. public static String extract (org.omg.CORBA.Any a)
  28. {
  29. return read (a.create_input_stream ());
  30. }
  31. private static org.omg.CORBA.TypeCode __typeCode = null;
  32. synchronized public static org.omg.CORBA.TypeCode type ()
  33. {
  34. if (__typeCode == null)
  35. {
  36. __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
  37. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.IdentifierHelper.id (), "Identifier", __typeCode);
  38. }
  39. return __typeCode;
  40. }
  41. public static String id ()
  42. {
  43. return _id;
  44. }
  45. public static String read (org.omg.CORBA.portable.InputStream istream)
  46. {
  47. String value = null;
  48. value = istream.read_string ();
  49. return value;
  50. }
  51. public static void write (org.omg.CORBA.portable.OutputStream ostream, String value)
  52. {
  53. ostream.write_string (value);
  54. }
  55. }