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