Fri, 10 Jul 2015 08:43:05 -0700
Merge
duke@1 | 1 | /* |
ohair@158 | 2 | * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@158 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@158 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@158 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@158 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@158 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | package org.omg.CORBA.portable; |
duke@1 | 26 | |
duke@1 | 27 | import org.omg.CORBA.TypeCode; |
duke@1 | 28 | import org.omg.CORBA.Principal; |
duke@1 | 29 | import org.omg.CORBA.Any; |
duke@1 | 30 | |
duke@1 | 31 | /** |
duke@1 | 32 | * InputStream is the Java API for reading IDL types |
duke@1 | 33 | * from CDR marshal streams. These methods are used by the ORB to |
duke@1 | 34 | * unmarshal IDL types as well as to extract IDL types out of Anys. |
duke@1 | 35 | * The <code>_array</code> versions of the methods can be directly |
duke@1 | 36 | * used to read sequences and arrays of IDL types. |
duke@1 | 37 | * |
duke@1 | 38 | * @since JDK1.2 |
duke@1 | 39 | */ |
duke@1 | 40 | |
duke@1 | 41 | public abstract class InputStream extends java.io.InputStream |
duke@1 | 42 | { |
duke@1 | 43 | /** |
duke@1 | 44 | * Reads a boolean value from this input stream. |
duke@1 | 45 | * |
duke@1 | 46 | * @return the <code>boolean</code> value read from this input stream |
duke@1 | 47 | */ |
duke@1 | 48 | public abstract boolean read_boolean(); |
duke@1 | 49 | /** |
duke@1 | 50 | * Reads a char value from this input stream. |
duke@1 | 51 | * |
duke@1 | 52 | * @return the <code>char</code> value read from this input stream |
duke@1 | 53 | */ |
duke@1 | 54 | public abstract char read_char(); |
duke@1 | 55 | /** |
duke@1 | 56 | * Reads a wide char value from this input stream. |
duke@1 | 57 | * |
duke@1 | 58 | * @return the <code>char</code> value read from this input stream |
duke@1 | 59 | */ |
duke@1 | 60 | public abstract char read_wchar(); |
duke@1 | 61 | /** |
duke@1 | 62 | * Reads an octet (that is, a byte) value from this input stream. |
duke@1 | 63 | * |
duke@1 | 64 | * @return the <code>byte</code> value read from this input stream |
duke@1 | 65 | */ |
duke@1 | 66 | public abstract byte read_octet(); |
duke@1 | 67 | /** |
duke@1 | 68 | * Reads a short value from this input stream. |
duke@1 | 69 | * |
duke@1 | 70 | * @return the <code>short</code> value read from this input stream |
duke@1 | 71 | */ |
duke@1 | 72 | public abstract short read_short(); |
duke@1 | 73 | /** |
duke@1 | 74 | * Reads a unsigned short value from this input stream. |
duke@1 | 75 | * |
duke@1 | 76 | * @return the <code>short</code> value read from this input stream |
duke@1 | 77 | */ |
duke@1 | 78 | public abstract short read_ushort(); |
duke@1 | 79 | /** |
duke@1 | 80 | * Reads a CORBA long (that is, Java int) value from this input stream. |
duke@1 | 81 | * |
duke@1 | 82 | * @return the <code>int</code> value read from this input stream |
duke@1 | 83 | */ |
duke@1 | 84 | public abstract int read_long(); |
duke@1 | 85 | /** |
duke@1 | 86 | * Reads an unsigned CORBA long (that is, Java int) value from this input |
duke@1 | 87 | stream. |
duke@1 | 88 | * |
duke@1 | 89 | * @return the <code>int</code> value read from this input stream |
duke@1 | 90 | */ |
duke@1 | 91 | public abstract int read_ulong(); |
duke@1 | 92 | /** |
duke@1 | 93 | * Reads a CORBA longlong (that is, Java long) value from this input stream. |
duke@1 | 94 | * |
duke@1 | 95 | * @return the <code>long</code> value read from this input stream |
duke@1 | 96 | */ |
duke@1 | 97 | public abstract long read_longlong(); |
duke@1 | 98 | /** |
duke@1 | 99 | * Reads a CORBA unsigned longlong (that is, Java long) value from this input |
duke@1 | 100 | stream. |
duke@1 | 101 | * |
duke@1 | 102 | * @return the <code>long</code> value read from this input stream |
duke@1 | 103 | */ |
duke@1 | 104 | public abstract long read_ulonglong(); |
duke@1 | 105 | /** |
duke@1 | 106 | * Reads a float value from this input stream. |
duke@1 | 107 | * |
duke@1 | 108 | * @return the <code>float</code> value read from this input stream |
duke@1 | 109 | */ |
duke@1 | 110 | public abstract float read_float(); |
duke@1 | 111 | /** |
duke@1 | 112 | * Reads a double value from this input stream. |
duke@1 | 113 | * |
duke@1 | 114 | * @return the <code>double</code> value read from this input stream |
duke@1 | 115 | */ |
duke@1 | 116 | public abstract double read_double(); |
duke@1 | 117 | /** |
duke@1 | 118 | * Reads a string value from this input stream. |
duke@1 | 119 | * |
duke@1 | 120 | * @return the <code>String</code> value read from this input stream |
duke@1 | 121 | */ |
duke@1 | 122 | public abstract String read_string(); |
duke@1 | 123 | /** |
duke@1 | 124 | * Reads a wide string value from this input stream. |
duke@1 | 125 | * |
duke@1 | 126 | * @return the <code>String</code> value read from this input stream |
duke@1 | 127 | */ |
duke@1 | 128 | public abstract String read_wstring(); |
duke@1 | 129 | |
duke@1 | 130 | /** |
duke@1 | 131 | * Reads an array of booleans from this input stream. |
duke@1 | 132 | * @param value returned array of booleans. |
duke@1 | 133 | * @param offset offset on the stream. |
duke@1 | 134 | * @param length length of buffer to read. |
duke@1 | 135 | */ |
duke@1 | 136 | public abstract void read_boolean_array(boolean[] value, int offset, int |
duke@1 | 137 | length); |
duke@1 | 138 | /** |
duke@1 | 139 | * Reads an array of chars from this input stream. |
duke@1 | 140 | * @param value returned array of chars. |
duke@1 | 141 | * @param offset offset on the stream. |
duke@1 | 142 | * @param length length of buffer to read. |
duke@1 | 143 | */ |
duke@1 | 144 | public abstract void read_char_array(char[] value, int offset, int |
duke@1 | 145 | length); |
duke@1 | 146 | /** |
duke@1 | 147 | * Reads an array of wide chars from this input stream. |
duke@1 | 148 | * @param value returned array of wide chars. |
duke@1 | 149 | * @param offset offset on the stream. |
duke@1 | 150 | * @param length length of buffer to read. |
duke@1 | 151 | */ |
duke@1 | 152 | public abstract void read_wchar_array(char[] value, int offset, int |
duke@1 | 153 | length); |
duke@1 | 154 | /** |
duke@1 | 155 | * Reads an array of octets (that is, bytes) from this input stream. |
duke@1 | 156 | * @param value returned array of octets (that is, bytes). |
duke@1 | 157 | * @param offset offset on the stream. |
duke@1 | 158 | * @param length length of buffer to read. |
duke@1 | 159 | */ |
duke@1 | 160 | public abstract void read_octet_array(byte[] value, int offset, int |
duke@1 | 161 | length); |
duke@1 | 162 | /** |
duke@1 | 163 | * Reads an array of shorts from this input stream. |
duke@1 | 164 | * @param value returned array of shorts. |
duke@1 | 165 | * @param offset offset on the stream. |
duke@1 | 166 | * @param length length of buffer to read. |
duke@1 | 167 | */ |
duke@1 | 168 | public abstract void read_short_array(short[] value, int offset, int |
duke@1 | 169 | length); |
duke@1 | 170 | /** |
duke@1 | 171 | * Reads an array of unsigned shorts from this input stream. |
duke@1 | 172 | * @param value returned array of shorts. |
duke@1 | 173 | * @param offset offset on the stream. |
duke@1 | 174 | * @param length length of buffer to read. |
duke@1 | 175 | */ |
duke@1 | 176 | public abstract void read_ushort_array(short[] value, int offset, int |
duke@1 | 177 | length); |
duke@1 | 178 | /** |
duke@1 | 179 | * Reads an array of CORBA longs (that is, Java ints) from this input stream. |
duke@1 | 180 | * @param value returned array of CORBA longs (that is, Java ints). |
duke@1 | 181 | * @param offset offset on the stream. |
duke@1 | 182 | * @param length length of buffer to read. |
duke@1 | 183 | */ |
duke@1 | 184 | public abstract void read_long_array(int[] value, int offset, int |
duke@1 | 185 | length); |
duke@1 | 186 | /** |
duke@1 | 187 | * Reads an array of unsigned CORBA longs (that is, Java ints) from this input |
duke@1 | 188 | stream. |
duke@1 | 189 | * @param value returned array of CORBA longs (that is, Java ints). |
duke@1 | 190 | * @param offset offset on the stream. |
duke@1 | 191 | * @param length length of buffer to read. |
duke@1 | 192 | */ |
duke@1 | 193 | public abstract void read_ulong_array(int[] value, int offset, int |
duke@1 | 194 | length); |
duke@1 | 195 | /** |
duke@1 | 196 | * Reads an array of CORBA longlongs (that is, Java longs) from this input |
duke@1 | 197 | stream. |
duke@1 | 198 | * @param value returned array of CORBA longs (that is, Java longs). |
duke@1 | 199 | * @param offset offset on the stream. |
duke@1 | 200 | * @param length length of buffer to read. |
duke@1 | 201 | */ |
duke@1 | 202 | public abstract void read_longlong_array(long[] value, int offset, int |
duke@1 | 203 | length); |
duke@1 | 204 | /** |
duke@1 | 205 | * Reads an array of unsigned CORBA longlongs (that is, Java longs) from this |
duke@1 | 206 | input stream. |
duke@1 | 207 | * @param value returned array of CORBA longs (that is, Java longs). |
duke@1 | 208 | * @param offset offset on the stream. |
duke@1 | 209 | * @param length length of buffer to read. |
duke@1 | 210 | */ |
duke@1 | 211 | public abstract void read_ulonglong_array(long[] value, int offset, int |
duke@1 | 212 | length); |
duke@1 | 213 | /** |
duke@1 | 214 | * Reads an array of floats from this input stream. |
duke@1 | 215 | * @param value returned array of floats. |
duke@1 | 216 | * @param offset offset on the stream. |
duke@1 | 217 | * @param length length of buffer to read. |
duke@1 | 218 | */ |
duke@1 | 219 | public abstract void read_float_array(float[] value, int offset, int |
duke@1 | 220 | length); |
duke@1 | 221 | /** |
duke@1 | 222 | * Reads an array of doubles from this input stream. |
duke@1 | 223 | * @param value returned array of doubles. |
duke@1 | 224 | * @param offset offset on the stream. |
duke@1 | 225 | * @param length length of buffer to read. |
duke@1 | 226 | */ |
duke@1 | 227 | public abstract void read_double_array(double[] value, int offset, int |
duke@1 | 228 | length); |
duke@1 | 229 | |
duke@1 | 230 | /** |
duke@1 | 231 | * Reads a CORBA object from this input stream. |
duke@1 | 232 | * |
duke@1 | 233 | * @return the <code>Object</code> instance read from this input stream. |
duke@1 | 234 | */ |
duke@1 | 235 | public abstract org.omg.CORBA.Object read_Object(); |
duke@1 | 236 | /** |
duke@1 | 237 | * Reads a <code>TypeCode</code> from this input stream. |
duke@1 | 238 | * |
duke@1 | 239 | * @return the <code>TypeCode</code> instance read from this input stream. |
duke@1 | 240 | */ |
duke@1 | 241 | public abstract TypeCode read_TypeCode(); |
duke@1 | 242 | /** |
duke@1 | 243 | * Reads an Any from this input stream. |
duke@1 | 244 | * |
duke@1 | 245 | * @return the <code>Any</code> instance read from this input stream. |
duke@1 | 246 | */ |
duke@1 | 247 | public abstract Any read_any(); |
duke@1 | 248 | |
duke@1 | 249 | /** |
duke@1 | 250 | * Returns principal for invocation. |
duke@1 | 251 | * @return Principal for invocation. |
duke@1 | 252 | * @deprecated Deprecated by CORBA 2.2. |
duke@1 | 253 | */ |
duke@1 | 254 | @Deprecated |
duke@1 | 255 | public Principal read_Principal() { |
duke@1 | 256 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 257 | } |
duke@1 | 258 | |
duke@1 | 259 | |
duke@1 | 260 | /** |
duke@1 | 261 | * @see <a href="package-summary.html#unimpl"><code>portable</code> |
duke@1 | 262 | * package comments for unimplemented features</a> |
duke@1 | 263 | */ |
duke@1 | 264 | public int read() throws java.io.IOException { |
duke@1 | 265 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 266 | } |
duke@1 | 267 | |
duke@1 | 268 | /** |
duke@1 | 269 | * Reads a BigDecimal number. |
duke@1 | 270 | * @return a java.math.BigDecimal number |
duke@1 | 271 | */ |
duke@1 | 272 | public java.math.BigDecimal read_fixed() { |
duke@1 | 273 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 274 | } |
duke@1 | 275 | |
duke@1 | 276 | /** |
duke@1 | 277 | * Reads a CORBA context from the stream. |
duke@1 | 278 | * @return a CORBA context |
duke@1 | 279 | * @see <a href="package-summary.html#unimpl"><code>portable</code> |
duke@1 | 280 | * package comments for unimplemented features</a> |
duke@1 | 281 | */ |
duke@1 | 282 | public org.omg.CORBA.Context read_Context() { |
duke@1 | 283 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 284 | } |
duke@1 | 285 | /* |
duke@1 | 286 | * The following methods were added by orbos/98-04-03: Java to IDL |
duke@1 | 287 | * Mapping. These are used by RMI over IIOP. |
duke@1 | 288 | */ |
duke@1 | 289 | |
duke@1 | 290 | /** |
duke@1 | 291 | * Unmarshals an object and returns a CORBA Object, |
duke@1 | 292 | * which is an instance of the class passed as its argument. |
duke@1 | 293 | * This class is the stub class of the expected type. |
duke@1 | 294 | * |
duke@1 | 295 | * @param clz The Class object for the stub class which |
duke@1 | 296 | * corresponds to the type that is statistically expected, or |
duke@1 | 297 | * the Class object for the RMI/IDL interface type that |
duke@1 | 298 | * is statistically expected. |
duke@1 | 299 | * @return an Object instance of clz read from this stream |
duke@1 | 300 | * |
duke@1 | 301 | * @see <a href="package-summary.html#unimpl"><code>portable</code> |
duke@1 | 302 | * package comments for unimplemented features</a> |
duke@1 | 303 | */ |
duke@1 | 304 | public org.omg.CORBA.Object read_Object(java.lang.Class |
duke@1 | 305 | clz) { |
duke@1 | 306 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 307 | } |
duke@1 | 308 | |
duke@1 | 309 | /** |
duke@1 | 310 | * Returns the ORB that created this InputStream. |
duke@1 | 311 | * |
duke@1 | 312 | * @return the <code>ORB</code> object that created this stream |
duke@1 | 313 | * |
duke@1 | 314 | * @see <a href="package-summary.html#unimpl"><code>portable</code> |
duke@1 | 315 | * package comments for unimplemented features</a> |
duke@1 | 316 | */ |
duke@1 | 317 | public org.omg.CORBA.ORB orb() { |
duke@1 | 318 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
duke@1 | 319 | } |
duke@1 | 320 | } |