1. /*
  2. * @(#)DataInputStream.java 1.6 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 read primitive data types from input streams
  12. * for unmarshaling custom value types. This interface is used by user
  13. * written custom unmarshaling code for custom value types.
  14. * @see org.omg.CORBA.DataOutputStream
  15. * @see org.omg.CORBA.CustomMarshal
  16. * @version 1.6 02/02/00
  17. */
  18. public interface DataInputStream extends org.omg.CORBA.portable.ValueBase
  19. {
  20. /** Reads an IDL <code>Any</code> value from the input stream.
  21. * @return the <code>Any</code> read.
  22. * @throws <code>org.omg.CORBA.MARSHAL</code>
  23. * If an inconsistency is detected, including not having registered
  24. * a streaming policy, then the standard system exception MARSHAL is raised.
  25. */
  26. org.omg.CORBA.Any read_any ();
  27. /** Reads an IDL boolean value from the input stream.
  28. * @return the boolean read.
  29. * @throws <code>org.omg.CORBA.MARSHAL</code>
  30. * If an inconsistency is detected, including not having registered
  31. * a streaming policy, then the standard system exception MARSHAL is raised.
  32. */
  33. boolean read_boolean ();
  34. /** Reads an IDL character value from the input stream.
  35. * @return the character read.
  36. * @throws <code>org.omg.CORBA.MARSHAL</code>
  37. * If an inconsistency is detected, including not having registered
  38. * a streaming policy, then the standard system exception MARSHAL is raised.
  39. */
  40. char read_char ();
  41. /** Reads an IDL wide character value from the input stream.
  42. * @return the wide character read.
  43. * @throws <code>org.omg.CORBA.MARSHAL</code>
  44. * If an inconsistency is detected, including not having registered
  45. * a streaming policy, then the standard system exception MARSHAL is raised.
  46. */
  47. char read_wchar ();
  48. /** Reads an IDL octet value from the input stream.
  49. * @return the octet value read.
  50. * @throws <code>org.omg.CORBA.MARSHAL</code>
  51. * If an inconsistency is detected, including not having registered
  52. * a streaming policy, then the standard system exception MARSHAL is raised.
  53. */
  54. byte read_octet ();
  55. /** Reads an IDL short from the input stream.
  56. * @return the short read.
  57. * @throws <code>org.omg.CORBA.MARSHAL</code>
  58. * If an inconsistency is detected, including not having registered
  59. * a streaming policy, then the standard system exception MARSHAL is raised.
  60. */
  61. short read_short ();
  62. /** Reads an IDL unsigned short from the input stream.
  63. * @return the unsigned short read.
  64. * @throws <code>org.omg.CORBA.MARSHAL</code>
  65. * If an inconsistency is detected, including not having registered
  66. * a streaming policy, then the standard system exception MARSHAL is raised.
  67. */
  68. short read_ushort ();
  69. /** Reads an IDL long from the input stream.
  70. * @return the long read.
  71. * @throws <code>org.omg.CORBA.MARSHAL</code>
  72. * If an inconsistency is detected, including not having registered
  73. * a streaming policy, then the standard system exception MARSHAL is raised.
  74. */
  75. int read_long ();
  76. /** Reads an IDL unsigned long from the input stream.
  77. * @return the unsigned long read.
  78. * @throws <code>org.omg.CORBA.MARSHAL</code>
  79. * If an inconsistency is detected, including not having registered
  80. * a streaming policy, then the standard system exception MARSHAL is raised.
  81. */
  82. int read_ulong ();
  83. /** Reads an IDL long long from the input stream.
  84. * @return the long long read.
  85. * @throws <code>org.omg.CORBA.MARSHAL</code>
  86. * If an inconsistency is detected, including not having registered
  87. * a streaming policy, then the standard system exception MARSHAL is raised.
  88. */
  89. long read_longlong ();
  90. /** Reads an unsigned IDL long long from the input stream.
  91. * @return the unsigned long long read.
  92. * @throws <code>org.omg.CORBA.MARSHAL</code>
  93. * If an inconsistency is detected, including not having registered
  94. * a streaming policy, then the standard system exception MARSHAL is raised.
  95. */
  96. long read_ulonglong ();
  97. /** Reads an IDL float from the input stream.
  98. * @return the float read.
  99. * @throws <code>org.omg.CORBA.MARSHAL</code>
  100. * If an inconsistency is detected, including not having registered
  101. * a streaming policy, then the standard system exception MARSHAL is raised.
  102. */
  103. float read_float ();
  104. /** Reads an IDL double from the input stream.
  105. * @return the double read.
  106. * @throws <code>org.omg.CORBA.MARSHAL</code>
  107. * If an inconsistency is detected, including not having registered
  108. * a streaming policy, then the standard system exception MARSHAL is raised.
  109. */
  110. double read_double ();
  111. // read_longdouble not supported by IDL/Java mapping
  112. /** Reads an IDL string from the input stream.
  113. * @return the string read.
  114. * @throws <code>org.omg.CORBA.MARSHAL</code>
  115. * If an inconsistency is detected, including not having registered
  116. * a streaming policy, then the standard system exception MARSHAL is raised.
  117. */
  118. String read_string ();
  119. /** Reads an IDL wide string from the input stream.
  120. * @return the wide string read.
  121. * @throws <code>org.omg.CORBA.MARSHAL</code>
  122. * If an inconsistency is detected, including not having registered
  123. * a streaming policy, then the standard system exception MARSHAL is raised.
  124. */
  125. String read_wstring ();
  126. /** Reads an IDL CORBA::Object from the input stream.
  127. * @return the CORBA::Object read.
  128. * @throws <code>org.omg.CORBA.MARSHAL</code>
  129. * If an inconsistency is detected, including not having registered
  130. * a streaming policy, then the standard system exception MARSHAL is raised.
  131. */
  132. org.omg.CORBA.Object read_Object ();
  133. /** Reads an IDL Abstract interface from the input stream.
  134. * @return the Abstract interface read.
  135. * @throws <code>org.omg.CORBA.MARSHAL</code>
  136. * If an inconsistency is detected, including not having registered
  137. * a streaming policy, then the standard system exception MARSHAL is raised.
  138. */
  139. java.lang.Object read_Abstract ();
  140. /** Reads an IDL value type from the input stream.
  141. * @return the value type read.
  142. * @throws <code>org.omg.CORBA.MARSHAL</code>
  143. * If an inconsistency is detected, including not having registered
  144. * a streaming policy, then the standard system exception MARSHAL is raised.
  145. */
  146. java.io.Serializable read_Value ();
  147. /** Reads an IDL typecode from the input stream.
  148. * @return the typecode read.
  149. * @throws <code>org.omg.CORBA.MARSHAL</code>
  150. * If an inconsistency is detected, including not having registered
  151. * a streaming policy, then the standard system exception MARSHAL is raised.
  152. */
  153. org.omg.CORBA.TypeCode read_TypeCode ();
  154. /** Reads array of IDL Anys from offset for length elements from the
  155. * input stream.
  156. * @param seq The out parameter holder for the array to be read.
  157. * @param offset The index into seq of the first element to read from the
  158. * input stream.
  159. * @param length The number of elements to read from the input stream.
  160. * @throws <code>org.omg.CORBA.MARSHAL</code>
  161. * If an inconsistency is detected, including not having registered
  162. * a streaming policy, then the standard system exception MARSHAL is raised.
  163. */
  164. void read_any_array (org.omg.CORBA.AnySeqHolder seq, int offset, int length);
  165. /** Reads array of IDL booleans from offset for length elements from the
  166. * input stream.
  167. * @param seq The out parameter holder for the array to be read.
  168. * @param offset The index into seq of the first element to read from the
  169. * input stream.
  170. * @param length The number of elements to read from the input stream.
  171. * @throws <code>org.omg.CORBA.MARSHAL</code>
  172. * If an inconsistency is detected, including not having registered
  173. * a streaming policy, then the standard system exception MARSHAL is raised.
  174. */
  175. void read_boolean_array (org.omg.CORBA.BooleanSeqHolder seq, int offset, int length);
  176. /** Reads array of IDL characters from offset for length elements from the
  177. * input stream.
  178. * @param seq The out parameter holder for the array to be read.
  179. * @param offset The index into seq of the first element to read from the
  180. * input stream.
  181. * @param length The number of elements to read from the input stream.
  182. * @throws <code>org.omg.CORBA.MARSHAL</code>
  183. * If an inconsistency is detected, including not having registered
  184. * a streaming policy, then the standard system exception MARSHAL is raised.
  185. */
  186. void read_char_array (org.omg.CORBA.CharSeqHolder seq, int offset, int length);
  187. /** Reads array of IDL wide characters from offset for length elements from the
  188. * input stream.
  189. * @param seq The out parameter holder for the array to be read.
  190. * @param offset The index into seq of the first element to read from the
  191. * input stream.
  192. * @param length The number of elements to read from the input stream.
  193. * @throws <code>org.omg.CORBA.MARSHAL</code>
  194. * If an inconsistency is detected, including not having registered
  195. * a streaming policy, then the standard system exception MARSHAL is raised.
  196. */
  197. void read_wchar_array (org.omg.CORBA.WCharSeqHolder seq, int offset, int length);
  198. /** Reads array of IDL octets from offset for length elements from the
  199. * input stream.
  200. * @param seq The out parameter holder for the array to be read.
  201. * @param offset The index into seq of the first element to read from the
  202. * input stream.
  203. * @param length The number of elements to read from the input stream.
  204. * @throws <code>org.omg.CORBA.MARSHAL</code>
  205. * If an inconsistency is detected, including not having registered
  206. * a streaming policy, then the standard system exception MARSHAL is raised.
  207. */
  208. void read_octet_array (org.omg.CORBA.OctetSeqHolder seq, int offset, int length);
  209. /** Reads array of IDL shorts from offset for length elements from the
  210. * input stream.
  211. * @param seq The out parameter holder for the array to be read.
  212. * @param offset The index into seq of the first element to read from the
  213. * input stream.
  214. * @param length The number of elements to read from the input stream.
  215. * @throws <code>org.omg.CORBA.MARSHAL</code>
  216. * If an inconsistency is detected, including not having registered
  217. * a streaming policy, then the standard system exception MARSHAL is raised.
  218. */
  219. void read_short_array (org.omg.CORBA.ShortSeqHolder seq, int offset, int length);
  220. /** Reads array of IDL unsigned shorts from offset for length elements from the
  221. * input stream.
  222. * @param seq The out parameter holder for the array to be read.
  223. * @param offset The index into seq of the first element to read from the
  224. * input stream.
  225. * @param length The number of elements to read from the input stream.
  226. * @throws <code>org.omg.CORBA.MARSHAL</code>
  227. * If an inconsistency is detected, including not having registered
  228. * a streaming policy, then the standard system exception MARSHAL is raised.
  229. */
  230. void read_ushort_array (org.omg.CORBA.UShortSeqHolder seq, int offset, int length);
  231. /** Reads array of IDL longs from offset for length elements from the
  232. * input stream.
  233. * @param seq The out parameter holder for the array to be read.
  234. * @param offset The index into seq of the first element to read from the
  235. * input stream.
  236. * @param length The number of elements to read from the input stream.
  237. * @throws <code>org.omg.CORBA.MARSHAL</code>
  238. * If an inconsistency is detected, including not having registered
  239. * a streaming policy, then the standard system exception MARSHAL is raised.
  240. */
  241. void read_long_array (org.omg.CORBA.LongSeqHolder seq, int offset, int length);
  242. /** Reads array of IDL unsigned longs from offset for length elements from the
  243. * input stream.
  244. * @param seq The out parameter holder for the array to be read.
  245. * @param offset The index into seq of the first element to read from the
  246. * input stream.
  247. * @param length The number of elements to read from the input stream.
  248. * @throws <code>org.omg.CORBA.MARSHAL</code>
  249. * If an inconsistency is detected, including not having registered
  250. * a streaming policy, then the standard system exception MARSHAL is raised.
  251. */
  252. void read_ulong_array (org.omg.CORBA.ULongSeqHolder seq, int offset, int length);
  253. /** Reads array of IDL unsigned long longs from offset for length elements from the
  254. * input stream.
  255. * @param seq The out parameter holder for the array to be read.
  256. * @param offset The index into seq of the first element to read from the
  257. * input stream.
  258. * @param length The number of elements to read from the input stream.
  259. * @throws <code>org.omg.CORBA.MARSHAL</code>
  260. * If an inconsistency is detected, including not having registered
  261. * a streaming policy, then the standard system exception MARSHAL is raised.
  262. */
  263. void read_ulonglong_array (org.omg.CORBA.ULongLongSeqHolder seq, int offset, int length);
  264. /** Reads array of IDL long longs from offset for length elements from the
  265. * input stream.
  266. * @param seq The out parameter holder for the array to be read.
  267. * @param offset The index into seq of the first element to read from the
  268. * input stream.
  269. * @param length The number of elements to read from the input stream.
  270. * @throws <code>org.omg.CORBA.MARSHAL</code>
  271. * If an inconsistency is detected, including not having registered
  272. * a streaming policy, then the standard system exception MARSHAL is raised.
  273. */
  274. void read_longlong_array (org.omg.CORBA.LongLongSeqHolder seq, int offset, int length);
  275. /** Reads array of IDL floats from offset for length elements from the
  276. * input stream.
  277. * @param seq The out parameter holder for the array to be read.
  278. * @param offset The index into seq of the first element to read from the
  279. * input stream.
  280. * @param length The number of elements to read from the input stream.
  281. * @throws <code>org.omg.CORBA.MARSHAL</code>
  282. * If an inconsistency is detected, including not having registered
  283. * a streaming policy, then the standard system exception MARSHAL is raised.
  284. */
  285. void read_float_array (org.omg.CORBA.FloatSeqHolder seq, int offset, int length);
  286. /** Reads array of IDL doubles from offset for length elements from the
  287. * input stream.
  288. * @param seq The out parameter holder for the array to be read.
  289. * @param offset The index into seq of the first element to read from the
  290. * input stream.
  291. * @param length The number of elements to read from the input stream.
  292. * @throws <code>org.omg.CORBA.MARSHAL</code>
  293. * If an inconsistency is detected, including not having registered
  294. * a streaming policy, then the standard system exception MARSHAL is raised.
  295. */
  296. void read_double_array (org.omg.CORBA.DoubleSeqHolder seq, int offset, int length);
  297. } // interface DataInputStream