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