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