1. /*
  2. * @(#)ULongSeqHelper.java 1.13 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA;
  8. /**
  9. * The Helper for <tt>ULongSeq</tt>. For more information on
  10. * Helper files, see <a href="doc-files/generatedfiles.html#helper">
  11. * "Generated Files: Helper Files"</a>.<P>
  12. * org/omg/CORBA/ULongSeqHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from streams.idl
  15. * 13 May 1999 22:41:36 o'clock GMT+00:00
  16. *
  17. * The class definition has been modified to conform to the following
  18. * OMG specifications :
  19. * <ul>
  20. * <li> ORB core as defined by CORBA 2.3.1
  21. * (<a href="http://cgi.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
  22. * </li>
  23. *
  24. * <li> IDL/Java Language Mapping as defined in
  25. * <a href="http://cgi.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
  26. * </li>
  27. * </ul>
  28. */
  29. public abstract class ULongSeqHelper
  30. {
  31. private static String _id = "IDL:omg.org/CORBA/ULongSeq:1.0";
  32. public static void insert (org.omg.CORBA.Any a, int[] that)
  33. {
  34. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  35. a.type (type ());
  36. write (out, that);
  37. a.read_value (out.create_input_stream (), type ());
  38. }
  39. public static int[] extract (org.omg.CORBA.Any a)
  40. {
  41. return read (a.create_input_stream ());
  42. }
  43. private static org.omg.CORBA.TypeCode __typeCode = null;
  44. synchronized public static org.omg.CORBA.TypeCode type ()
  45. {
  46. if (__typeCode == null)
  47. {
  48. __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
  49. __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
  50. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.ULongSeqHelper.id (), "ULongSeq", __typeCode);
  51. }
  52. return __typeCode;
  53. }
  54. public static String id ()
  55. {
  56. return _id;
  57. }
  58. public static int[] read (org.omg.CORBA.portable.InputStream istream)
  59. {
  60. int value[] = null;
  61. int _len0 = istream.read_long ();
  62. value = new int[_len0];
  63. istream.read_ulong_array (value, 0, _len0);
  64. return value;
  65. }
  66. public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value)
  67. {
  68. ostream.write_long (value.length);
  69. ostream.write_ulong_array (value, 0, value.length);
  70. }
  71. }