1. /*
  2. * @(#)DataOutputStream.java 1.12 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. /** Defines the methods used to write primitive data types to output streams
  9. * for marshalling custom value types. This interface is used by user
  10. * written custom marshalling code for custom value types.
  11. * @see org.omg.CORBA.DataInputStream
  12. * @see org.omg.CORBA.CustomMarshal
  13. * @version 1.12 12/19/03
  14. */
  15. public interface DataOutputStream extends org.omg.CORBA.portable.ValueBase
  16. {
  17. /**
  18. * Writes the Any value to the output stream.
  19. * @param value The value to be written.
  20. */
  21. void write_any (org.omg.CORBA.Any value);
  22. /**
  23. * Writes the boolean value to the output stream.
  24. * @param value The value to be written.
  25. */
  26. void write_boolean (boolean value);
  27. /**
  28. * Writes the IDL character value to the output stream.
  29. * @param value The value to be written.
  30. */
  31. void write_char (char value);
  32. /**
  33. * Writes the IDL wide character value to the output stream.
  34. * @param value The value to be written.
  35. */
  36. void write_wchar (char value);
  37. /**
  38. * Writes the IDL octet value (represented as a Java byte) to the output stream.
  39. * @param value The value to be written.
  40. */
  41. void write_octet (byte value);
  42. /**
  43. * Writes the IDL short value to the output stream.
  44. * @param value The value to be written.
  45. */
  46. void write_short (short value);
  47. /**
  48. * Writes the IDL unsigned short value (represented as a Java short
  49. * value) to the output stream.
  50. * @param value The value to be written.
  51. */
  52. void write_ushort (short value);
  53. /**
  54. * Writes the IDL long value (represented as a Java int) to the output stream.
  55. * @param value The value to be written.
  56. */
  57. void write_long (int value);
  58. /**
  59. * Writes the IDL unsigned long value (represented as a Java int) to the output stream.
  60. * @param value The value to be written.
  61. */
  62. void write_ulong (int value);
  63. /**
  64. * Writes the IDL long long value (represented as a Java long) to the output stream.
  65. * @param value The value to be written.
  66. */
  67. void write_longlong (long value);
  68. /**
  69. * Writes the IDL unsigned long long value (represented as a Java long)
  70. * to the output stream.
  71. * @param value The value to be written.
  72. */
  73. void write_ulonglong (long value);
  74. /**
  75. * Writes the IDL float value to the output stream.
  76. * @param value The value to be written.
  77. */
  78. void write_float (float value);
  79. /**
  80. * Writes the IDL double value to the output stream.
  81. * @param value The value to be written.
  82. */
  83. void write_double (double value);
  84. // write_longdouble not supported by IDL/Java mapping
  85. /**
  86. * Writes the IDL string value to the output stream.
  87. * @param value The value to be written.
  88. */
  89. void write_string (String value);
  90. /**
  91. * Writes the IDL wide string value (represented as a Java String) to the output stream.
  92. * @param value The value to be written.
  93. */
  94. void write_wstring (String value);
  95. /**
  96. * Writes the IDL CORBA::Object value to the output stream.
  97. * @param value The value to be written.
  98. */
  99. void write_Object (org.omg.CORBA.Object value);
  100. /**
  101. * Writes the IDL Abstract interface type to the output stream.
  102. * @param value The value to be written.
  103. */
  104. void write_Abstract (java.lang.Object value);
  105. /**
  106. * Writes the IDL value type value to the output stream.
  107. * @param value The value to be written.
  108. */
  109. void write_Value (java.io.Serializable value);
  110. /**
  111. * Writes the typecode to the output stream.
  112. * @param value The value to be written.
  113. */
  114. void write_TypeCode (org.omg.CORBA.TypeCode value);
  115. /**
  116. * Writes the array of IDL Anys from offset for length elements to the
  117. * output stream.
  118. * @param seq The array to be written.
  119. * @param offset The index into seq of the first element to write to the
  120. * output stream.
  121. * @param length The number of elements to write to the output stream.
  122. */
  123. void write_any_array (org.omg.CORBA.Any[] seq, int offset, int length);
  124. /**
  125. * Writes the array of IDL booleans from offset for length elements to the
  126. * output stream.
  127. * @param seq The array to be written.
  128. * @param offset The index into seq of the first element to write to the
  129. * output stream.
  130. * @param length The number of elements to write to the output stream.
  131. */
  132. void write_boolean_array (boolean[] seq, int offset, int length);
  133. /**
  134. * Writes the array of IDL characters from offset for length elements to the
  135. * output stream.
  136. * @param seq The array to be written.
  137. * @param offset The index into seq of the first element to write to the
  138. * output stream.
  139. * @param length The number of elements to write to the output stream.
  140. */
  141. void write_char_array (char[] seq, int offset, int length);
  142. /**
  143. * Writes the array of IDL wide characters from offset for length elements to the
  144. * output stream.
  145. * @param seq The array to be written.
  146. * @param offset The index into seq of the first element to write to the
  147. * output stream.
  148. * @param length The number of elements to write to the output stream.
  149. */
  150. void write_wchar_array (char[] seq, int offset, int length);
  151. /**
  152. * Writes the array of IDL octets from offset for length elements to the
  153. * output stream.
  154. * @param seq The array to be written.
  155. * @param offset The index into seq of the first element to write to the
  156. * output stream.
  157. * @param length The number of elements to write to the output stream.
  158. */
  159. void write_octet_array (byte[] seq, int offset, int length);
  160. /**
  161. * Writes the array of IDL shorts from offset for length elements to the
  162. * output stream.
  163. * @param seq The array to be written.
  164. * @param offset The index into seq of the first element to write to the
  165. * output stream.
  166. * @param length The number of elements to write to the output stream.
  167. */
  168. void write_short_array (short[] seq, int offset, int length);
  169. /**
  170. * Writes the array of IDL unsigned shorts (represented as Java shorts)
  171. * from offset for length elements to the output stream.
  172. * @param seq The array to be written.
  173. * @param offset The index into seq of the first element to write to the
  174. * output stream.
  175. * @param length The number of elements to write to the output stream.
  176. */
  177. void write_ushort_array (short[] seq, int offset, int length);
  178. /**
  179. * Writes the array of IDL longs from offset for length elements to the
  180. * output stream.
  181. * @param seq The array to be written.
  182. * @param offset The index into seq of the first element to write to the
  183. * output stream.
  184. * @param length The number of elements to write to the output stream.
  185. */
  186. void write_long_array (int[] seq, int offset, int length);
  187. /**
  188. * Writes the array of IDL unsigned longs (represented as Java ints)
  189. * from offset for length elements to the output stream.
  190. * @param seq The array to be written.
  191. * @param offset The index into seq of the first element to write to the
  192. * output stream.
  193. * @param length The number of elements to write to the output stream.
  194. */
  195. void write_ulong_array (int[] seq, int offset, int length);
  196. /**
  197. * Writes the array of IDL unsigned long longs (represented as Java longs)
  198. * from offset for length elements to the output stream.
  199. * @param seq The array to be written.
  200. * @param offset The index into seq of the first element to write to the
  201. * output stream.
  202. * @param length The number of elements to write to the output stream.
  203. */
  204. void write_ulonglong_array (long[] seq, int offset, int length);
  205. /**
  206. * Writes the array of IDL long longs from offset for length elements to the
  207. * output stream.
  208. * @param seq The array to be written.
  209. * @param offset The index into seq of the first element to write to the
  210. * output stream.
  211. * @param length The number of elements to write to the output stream.
  212. */
  213. void write_longlong_array (long[] seq, int offset, int length);
  214. /**
  215. * Writes the array of IDL floats from offset for length elements to the
  216. * output stream.
  217. * @param seq The array to be written.
  218. * @param offset The index into seq of the first element to write to the
  219. * output stream.
  220. * @param length The number of elements to write to the output stream.
  221. */
  222. void write_float_array (float[] seq, int offset, int length);
  223. /**
  224. * Writes the array of IDL doubles from offset for length elements to the
  225. * output stream.
  226. * @param seq The array to be written.
  227. * @param offset The index into seq of the first element to write to the
  228. * output stream.
  229. * @param length The number of elements to write to the output stream.
  230. */
  231. void write_double_array (double[] seq, int offset, int length);
  232. } // interface DataOutputStream