1. package org.omg.CosNaming;
  2. /**
  3. * org/omg/CosNaming/IstringHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
  6. * Monday, February 23, 2004 7:03:07 AM GMT
  7. */
  8. abstract public class IstringHelper
  9. {
  10. private static String _id = "IDL:omg.org/CosNaming/Istring:1.0";
  11. public static void insert (org.omg.CORBA.Any a, String that)
  12. {
  13. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  14. a.type (type ());
  15. write (out, that);
  16. a.read_value (out.create_input_stream (), type ());
  17. }
  18. public static String extract (org.omg.CORBA.Any a)
  19. {
  20. return read (a.create_input_stream ());
  21. }
  22. private static org.omg.CORBA.TypeCode __typeCode = null;
  23. synchronized public static org.omg.CORBA.TypeCode type ()
  24. {
  25. if (__typeCode == null)
  26. {
  27. __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
  28. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CosNaming.IstringHelper.id (), "Istring", __typeCode);
  29. }
  30. return __typeCode;
  31. }
  32. public static String id ()
  33. {
  34. return _id;
  35. }
  36. public static String read (org.omg.CORBA.portable.InputStream istream)
  37. {
  38. String value = null;
  39. value = istream.read_string ();
  40. return value;
  41. }
  42. public static void write (org.omg.CORBA.portable.OutputStream ostream, String value)
  43. {
  44. ostream.write_string (value);
  45. }
  46. }