1. /*
  2. * @(#)CodeSetsComponent.java 1.21 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. //Source file: J:/ws/serveractivation/src/share/classes/com.sun.corba.se.internal.ior/CodeSetsComponent.java
  8. package com.sun.corba.se.internal.ior;
  9. import org.omg.CORBA_2_3.portable.OutputStream ;
  10. import com.sun.corba.se.internal.ior.TaggedComponentBase ;
  11. import org.omg.IOP.TAG_CODE_SETS ;
  12. import com.sun.corba.se.internal.core.CodeSetComponentInfo ;
  13. import com.sun.corba.se.internal.core.MarshalOutputStream ;
  14. /**
  15. * @author
  16. */
  17. public class CodeSetsComponent extends TaggedComponentBase
  18. {
  19. CodeSetComponentInfo csci ;
  20. public boolean equals( Object obj )
  21. {
  22. return obj instanceof CodeSetsComponent ;
  23. }
  24. // Just use the default toString() method
  25. /**
  26. * @return
  27. * @exception
  28. * @author
  29. * @roseuid 3910984B035E
  30. */
  31. public CodeSetsComponent()
  32. {
  33. // Uses our default code sets (see CodeSetComponentInfo)
  34. csci = new CodeSetComponentInfo() ;
  35. }
  36. public CodeSetsComponent(com.sun.corba.se.internal.core.ORB orb)
  37. {
  38. if (orb == null)
  39. csci = new CodeSetComponentInfo();
  40. else
  41. csci = orb.getCodeSetComponentInfo();
  42. }
  43. public CodeSetComponentInfo getCodeSetComponentInfo()
  44. {
  45. return csci ;
  46. }
  47. /**
  48. * @param arg0
  49. * @return void
  50. * @exception
  51. * @author
  52. * @roseuid 3913261100DD
  53. */
  54. public void writeContents(OutputStream os)
  55. {
  56. csci.write( (MarshalOutputStream)os ) ;
  57. }
  58. /**
  59. * @return int
  60. * @exception
  61. * @author
  62. * @roseuid 391326110368
  63. */
  64. public int getId()
  65. {
  66. return TAG_CODE_SETS.value ; // 1 in CORBA 2.3.1 13.6.3
  67. }
  68. }