DataOutputStream.java 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /* DataOutputStream.java --
  2. Copyright (C) 2005, 2006 Free Software Foundation, Inc.
  3. This file is part of GNU Classpath.
  4. GNU Classpath is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU Classpath is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Classpath; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA.
  16. Linking this library statically or dynamically with other modules is
  17. making a combined work based on this library. Thus, the terms and
  18. conditions of the GNU General Public License cover the whole
  19. combination.
  20. As a special exception, the copyright holders of this library give you
  21. permission to link this library with independent modules to produce an
  22. executable, regardless of the license terms of these independent
  23. modules, and to copy and distribute the resulting executable under
  24. terms of your choice, provided that you also meet, for each linked
  25. independent module, the terms and conditions of the license of that
  26. module. An independent module is a module which is not derived from
  27. or based on this library. If you modify this library, you may extend
  28. this exception to your version of the library, but you are not
  29. obligated to do so. If you do not wish to do so, delete this
  30. exception statement from your version. */
  31. package org.omg.CORBA;
  32. import org.omg.CORBA.portable.ValueBase;
  33. /**
  34. * An interface for writing the custom value types. A value type, providing
  35. * its own mechanism for writing the content, must implement
  36. * the {@link CustomValue} that uses this interface.
  37. *
  38. * @see CustomValue
  39. * @see CustomMarshal
  40. *
  41. * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
  42. */
  43. public interface DataOutputStream
  44. extends ValueBase
  45. {
  46. /**
  47. * Write {@link Any} to the output stream.
  48. *
  49. * @param value a value to write.
  50. */
  51. void write_any(Any value);
  52. /**
  53. * Write boolean to the output stream.
  54. *
  55. * @param value a value to write.
  56. */
  57. void write_boolean(boolean value);
  58. /**
  59. * Write narrow (usually 8 bit) char to the output stream.
  60. *
  61. * @param value a value to write.
  62. */
  63. void write_char(char value);
  64. /**
  65. * Write wide (usually 16 bit) char to the output stream.
  66. *
  67. * @param value a value to write.
  68. */
  69. void write_wchar(char value);
  70. /**
  71. * Write octet (byte) to the output stream.
  72. *
  73. * @param value a value to write.
  74. */
  75. void write_octet(byte value);
  76. /**
  77. * Write short (16 bit signed integer) to the output stream.
  78. *
  79. * @param value a value to write.
  80. */
  81. void write_short(short value);
  82. /**
  83. * Write unsigned short to the output stream.
  84. *
  85. * @param value a value to write.
  86. */
  87. void write_ushort(short value);
  88. /**
  89. * Write CORBA long (32 bits, java int) to the output stream.
  90. *
  91. * @param value a value to write.
  92. */
  93. void write_long(int value);
  94. /**
  95. * Write unsigned CORBA long (32 bits, java int) to the output stream.
  96. *
  97. * @param value a value to write.
  98. */
  99. void write_ulong(int value);
  100. /**
  101. * Write CORBA long long (64 bits, java long) to the output stream.
  102. *
  103. * @param value a value to write.
  104. */
  105. void write_longlong(long value);
  106. /**
  107. * Write unsigned CORBA long long (64 bits, java long) to the output stream.
  108. *
  109. * @param value a value to write.
  110. */
  111. void write_ulonglong(long value);
  112. /**
  113. * Write float to the output stream.
  114. *
  115. * @param value a value to write.
  116. */
  117. void write_float(float value);
  118. /**
  119. * Write double to the output stream.
  120. *
  121. * @param value a value to write.
  122. */
  123. void write_double(double value);
  124. /**
  125. * Write narrow (usually 8 bits per character) string to the output stream.
  126. *
  127. * @param value a value to write.
  128. */
  129. void write_string(String value);
  130. /**
  131. * Write wide (usually 16 bits per character) string to the output stream.
  132. *
  133. * @param value a value to write.
  134. */
  135. void write_wstring(String value);
  136. /**
  137. * Write CORBA object reference to the output stream.
  138. *
  139. * @param value a value to write, null should be supported.
  140. */
  141. void write_Object(org.omg.CORBA.Object value);
  142. /**
  143. * Write abstract interface to the output stream.
  144. *
  145. * @param value a value to write, can be either CORBA object or
  146. * CORBA value type.
  147. */
  148. void write_Abstract(java.lang.Object value);
  149. /**
  150. * Write value type to the output stream.
  151. *
  152. * @param value a value to write.
  153. */
  154. void write_Value(java.io.Serializable value);
  155. /**
  156. * Write typecode to the output stream.
  157. *
  158. * @param value a value to write.
  159. */
  160. void write_TypeCode(TypeCode value);
  161. /**
  162. * Write array of Any's to the output stream.
  163. *
  164. * @param seq a value to write.
  165. */
  166. void write_any_array(Any[] seq, int offset, int length);
  167. /**
  168. * Write array of boolean's to the output stream.
  169. *
  170. * @param seq a value to write.
  171. */
  172. void write_boolean_array(boolean[] seq, int offset, int length);
  173. /**
  174. * Write array of narrow chars to the output stream.
  175. *
  176. * @param seq a value to write.
  177. */
  178. void write_char_array(char[] seq, int offset, int length);
  179. /**
  180. * Write array of wide chars to the output stream.
  181. *
  182. * @param seq a value to write.
  183. */
  184. void write_wchar_array(char[] seq, int offset, int length);
  185. /**
  186. * Write array of octets (bytes) to the output stream.
  187. *
  188. * @param seq a value to write.
  189. */
  190. void write_octet_array(byte[] seq, int offset, int length);
  191. /**
  192. * Write array of shorts (16 bit integers) to the output stream.
  193. *
  194. * @param seq a value to write.
  195. */
  196. void write_short_array(short[] seq, int offset, int length);
  197. /**
  198. * Write array of unsigned shorts (16 bit integers) to the output stream.
  199. *
  200. * @param seq a value to write.
  201. */
  202. void write_ushort_array(short[] seq, int offset, int length);
  203. /**
  204. * Write array of CORBA longs (java ints) to the output stream.
  205. *
  206. * @param seq a value to write.
  207. */
  208. void write_long_array(int[] seq, int offset, int length);
  209. /**
  210. * Write array of unsigned CORBA longs (java ints) to the output stream.
  211. *
  212. * @param seq a value to write.
  213. */
  214. void write_ulong_array(int[] seq, int offset, int length);
  215. /**
  216. * Write array of unsigned CORBA long longs (java longs)
  217. * to the output stream.
  218. *
  219. * @param seq a value to write.
  220. */
  221. void write_ulonglong_array(long[] seq, int offset, int length);
  222. /**
  223. * Write arrayo fo CORBA long longs (java ints) to the output stream.
  224. *
  225. * @param seq a value to write.
  226. */
  227. void write_longlong_array(long[] seq, int offset, int length);
  228. /**
  229. * Write array of floats to the output stream.
  230. *
  231. * @param seq a value to write.
  232. */
  233. void write_float_array(float[] seq, int offset, int length);
  234. /**
  235. * Write array of doubles to the output stream.
  236. *
  237. * @param seq a value to write.
  238. */
  239. void write_double_array(double[] seq, int offset, int length);
  240. }