1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/ObjectIdHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Wednesday, September 15, 2004 10:28:46 AM GMT
  7. */
  8. /** Type of an object id. This provides the identity of a particular
  9. * object that was created by an object adapter.
  10. */
  11. abstract public class ObjectIdHelper
  12. {
  13. private static String _id = "IDL:omg.org/PortableInterceptor/ObjectId:1.0";
  14. public static void insert (org.omg.CORBA.Any a, byte[] 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 byte[] 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 ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet);
  31. __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
  32. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.OctetSeqHelper.id (), "OctetSeq", __typeCode);
  33. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.ObjectIdHelper.id (), "ObjectId", __typeCode);
  34. }
  35. return __typeCode;
  36. }
  37. public static String id ()
  38. {
  39. return _id;
  40. }
  41. public static byte[] read (org.omg.CORBA.portable.InputStream istream)
  42. {
  43. byte value[] = null;
  44. value = org.omg.CORBA.OctetSeqHelper.read (istream);
  45. return value;
  46. }
  47. public static void write (org.omg.CORBA.portable.OutputStream ostream, byte[] value)
  48. {
  49. org.omg.CORBA.OctetSeqHelper.write (ostream, value);
  50. }
  51. }