src/share/classes/org/omg/CORBA/portable/InputStream.java

Wed, 27 Apr 2016 01:21:28 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:21:28 +0800
changeset 0
7ef37b2cdcad
child 748
6845b95cba6b
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/corba/
changeset: 765:f46df0af2ca8
tag: jdk8u25-b17

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

mercurial