1. /*
  2. * @(#)ServiceDetailHelper.java 1.11 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. /**
  8. * The Helper for <tt>ServiceDetail</tt>. For more information on
  9. * Helper files, see <a href="doc-files/generatedfiles.html#helper">
  10. * "Generated Files: Helper Files"</a>.<P>
  11. */
  12. package org.omg.CORBA;
  13. public abstract class ServiceDetailHelper {
  14. public static void write(org.omg.CORBA.portable.OutputStream out, org.omg.CORBA.ServiceDetail that) {
  15. out.write_ulong(that.service_detail_type);
  16. {
  17. out.write_long(that.service_detail.length);
  18. out.write_octet_array(that.service_detail, 0, that.service_detail.length);
  19. }
  20. }
  21. public static org.omg.CORBA.ServiceDetail read(org.omg.CORBA.portable.InputStream in) {
  22. org.omg.CORBA.ServiceDetail that = new org.omg.CORBA.ServiceDetail();
  23. that.service_detail_type = in.read_ulong();
  24. {
  25. int __length = in.read_long();
  26. that.service_detail = new byte[__length];
  27. in.read_octet_array(that.service_detail, 0, that.service_detail.length);
  28. }
  29. return that;
  30. }
  31. public static org.omg.CORBA.ServiceDetail extract(org.omg.CORBA.Any a) {
  32. org.omg.CORBA.portable.InputStream in = a.create_input_stream();
  33. return read(in);
  34. }
  35. public static void insert(org.omg.CORBA.Any a, org.omg.CORBA.ServiceDetail that) {
  36. org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
  37. write(out, that);
  38. a.read_value(out.create_input_stream(), type());
  39. }
  40. private static org.omg.CORBA.TypeCode _tc;
  41. synchronized public static org.omg.CORBA.TypeCode type() {
  42. int _memberCount = 2;
  43. org.omg.CORBA.StructMember[] _members = null;
  44. if (_tc == null) {
  45. _members= new org.omg.CORBA.StructMember[2];
  46. _members[0] = new org.omg.CORBA.StructMember(
  47. "service_detail_type",
  48. org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong),
  49. null);
  50. _members[1] = new org.omg.CORBA.StructMember(
  51. "service_detail",
  52. org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_octet)),
  53. null);
  54. _tc = org.omg.CORBA.ORB.init().create_struct_tc(id(), "ServiceDetail", _members);
  55. }
  56. return _tc;
  57. }
  58. public static String id() {
  59. return "IDL:omg.org/CORBA/ServiceDetail:1.0";
  60. }
  61. }