1. package org.omg.CosNaming.NamingContextExtPackage;
  2. /**
  3. * org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.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. /**
  9. * URLString is the URL address (corbaloc: or corbaname:) represented as
  10. * a String.
  11. */
  12. abstract public class URLStringHelper
  13. {
  14. private static String _id = "IDL:omg.org/CosNaming/NamingContextExt/URLString:1.0";
  15. public static void insert (org.omg.CORBA.Any a, String that)
  16. {
  17. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  18. a.type (type ());
  19. write (out, that);
  20. a.read_value (out.create_input_stream (), type ());
  21. }
  22. public static String extract (org.omg.CORBA.Any a)
  23. {
  24. return read (a.create_input_stream ());
  25. }
  26. private static org.omg.CORBA.TypeCode __typeCode = null;
  27. synchronized public static org.omg.CORBA.TypeCode type ()
  28. {
  29. if (__typeCode == null)
  30. {
  31. __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
  32. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.id (), "URLString", __typeCode);
  33. }
  34. return __typeCode;
  35. }
  36. public static String id ()
  37. {
  38. return _id;
  39. }
  40. public static String read (org.omg.CORBA.portable.InputStream istream)
  41. {
  42. String value = null;
  43. value = istream.read_string ();
  44. return value;
  45. }
  46. public static void write (org.omg.CORBA.portable.OutputStream ostream, String value)
  47. {
  48. ostream.write_string (value);
  49. }
  50. }