1. /*
  2. * @(#)AddressingDispositionHelper.java 1.8 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 com.sun.corba.se.impl.protocol.giopmsgheaders;
  8. /**
  9. * com/sun/corba/se/impl/protocol/giopmsgheaders/AddressingDispositionHelper.java
  10. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  11. * from ../../../../../../../src/share/classes/com/sun/corba/se/GiopIDL/g.idl
  12. * Sunday, June 4, 2000 5:18:54 PM PDT
  13. */
  14. abstract public class AddressingDispositionHelper
  15. {
  16. private static String _id = "IDL:messages/AddressingDisposition:1.0";
  17. public static void insert (org.omg.CORBA.Any a, short that)
  18. {
  19. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  20. a.type (type ());
  21. write (out, that);
  22. a.read_value (out.create_input_stream (), type ());
  23. }
  24. public static short extract (org.omg.CORBA.Any a)
  25. {
  26. return read (a.create_input_stream ());
  27. }
  28. private static org.omg.CORBA.TypeCode __typeCode = null;
  29. synchronized public static org.omg.CORBA.TypeCode type ()
  30. {
  31. if (__typeCode == null)
  32. {
  33. __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
  34. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.impl.protocol.giopmsgheaders.AddressingDispositionHelper.id (), "AddressingDisposition", __typeCode);
  35. }
  36. return __typeCode;
  37. }
  38. public static String id ()
  39. {
  40. return _id;
  41. }
  42. public static short read (org.omg.CORBA.portable.InputStream istream)
  43. {
  44. short value = (short)0;
  45. value = istream.read_short ();
  46. return value;
  47. }
  48. public static void write (org.omg.CORBA.portable.OutputStream ostream, short value)
  49. {
  50. ostream.write_short (value);
  51. }
  52. }