aoqi@0: /*
aoqi@0: * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0: *
aoqi@0: * This code is free software; you can redistribute it and/or modify it
aoqi@0: * under the terms of the GNU General Public License version 2 only, as
aoqi@0: * published by the Free Software Foundation. Oracle designates this
aoqi@0: * particular file as subject to the "Classpath" exception as provided
aoqi@0: * by Oracle in the LICENSE file that accompanied this code.
aoqi@0: *
aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0: * accompanied this code).
aoqi@0: *
aoqi@0: * You should have received a copy of the GNU General Public License version
aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0: *
aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0: * or visit www.oracle.com if you need additional information or have any
aoqi@0: * questions.
aoqi@0: */
aoqi@0: package org.omg.CORBA.portable;
aoqi@0:
aoqi@0: import org.omg.CORBA.TypeCode;
aoqi@0: import org.omg.CORBA.Principal;
aoqi@0: import org.omg.CORBA.Any;
aoqi@0:
aoqi@0: /**
aoqi@0: * InputStream is the Java API for reading IDL types
aoqi@0: * from CDR marshal streams. These methods are used by the ORB to
aoqi@0: * unmarshal IDL types as well as to extract IDL types out of Anys.
aoqi@0: * The _array
versions of the methods can be directly
aoqi@0: * used to read sequences and arrays of IDL types.
aoqi@0: *
aoqi@0: * @since JDK1.2
aoqi@0: */
aoqi@0:
aoqi@0: public abstract class InputStream extends java.io.InputStream
aoqi@0: {
aoqi@0: /**
aoqi@0: * Reads a boolean value from this input stream.
aoqi@0: *
aoqi@0: * @return the boolean
value read from this input stream
aoqi@0: */
aoqi@0: public abstract boolean read_boolean();
aoqi@0: /**
aoqi@0: * Reads a char value from this input stream.
aoqi@0: *
aoqi@0: * @return the char
value read from this input stream
aoqi@0: */
aoqi@0: public abstract char read_char();
aoqi@0: /**
aoqi@0: * Reads a wide char value from this input stream.
aoqi@0: *
aoqi@0: * @return the char
value read from this input stream
aoqi@0: */
aoqi@0: public abstract char read_wchar();
aoqi@0: /**
aoqi@0: * Reads an octet (that is, a byte) value from this input stream.
aoqi@0: *
aoqi@0: * @return the byte
value read from this input stream
aoqi@0: */
aoqi@0: public abstract byte read_octet();
aoqi@0: /**
aoqi@0: * Reads a short value from this input stream.
aoqi@0: *
aoqi@0: * @return the short
value read from this input stream
aoqi@0: */
aoqi@0: public abstract short read_short();
aoqi@0: /**
aoqi@0: * Reads a unsigned short value from this input stream.
aoqi@0: *
aoqi@0: * @return the short
value read from this input stream
aoqi@0: */
aoqi@0: public abstract short read_ushort();
aoqi@0: /**
aoqi@0: * Reads a CORBA long (that is, Java int) value from this input stream.
aoqi@0: *
aoqi@0: * @return the int
value read from this input stream
aoqi@0: */
aoqi@0: public abstract int read_long();
aoqi@0: /**
aoqi@0: * Reads an unsigned CORBA long (that is, Java int) value from this input
aoqi@0: stream.
aoqi@0: *
aoqi@0: * @return the int
value read from this input stream
aoqi@0: */
aoqi@0: public abstract int read_ulong();
aoqi@0: /**
aoqi@0: * Reads a CORBA longlong (that is, Java long) value from this input stream.
aoqi@0: *
aoqi@0: * @return the long
value read from this input stream
aoqi@0: */
aoqi@0: public abstract long read_longlong();
aoqi@0: /**
aoqi@0: * Reads a CORBA unsigned longlong (that is, Java long) value from this input
aoqi@0: stream.
aoqi@0: *
aoqi@0: * @return the long
value read from this input stream
aoqi@0: */
aoqi@0: public abstract long read_ulonglong();
aoqi@0: /**
aoqi@0: * Reads a float value from this input stream.
aoqi@0: *
aoqi@0: * @return the float
value read from this input stream
aoqi@0: */
aoqi@0: public abstract float read_float();
aoqi@0: /**
aoqi@0: * Reads a double value from this input stream.
aoqi@0: *
aoqi@0: * @return the double
value read from this input stream
aoqi@0: */
aoqi@0: public abstract double read_double();
aoqi@0: /**
aoqi@0: * Reads a string value from this input stream.
aoqi@0: *
aoqi@0: * @return the String
value read from this input stream
aoqi@0: */
aoqi@0: public abstract String read_string();
aoqi@0: /**
aoqi@0: * Reads a wide string value from this input stream.
aoqi@0: *
aoqi@0: * @return the String
value read from this input stream
aoqi@0: */
aoqi@0: public abstract String read_wstring();
aoqi@0:
aoqi@0: /**
aoqi@0: * Reads an array of booleans from this input stream.
aoqi@0: * @param value returned array of booleans.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_boolean_array(boolean[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of chars from this input stream.
aoqi@0: * @param value returned array of chars.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_char_array(char[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of wide chars from this input stream.
aoqi@0: * @param value returned array of wide chars.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_wchar_array(char[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of octets (that is, bytes) from this input stream.
aoqi@0: * @param value returned array of octets (that is, bytes).
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_octet_array(byte[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of shorts from this input stream.
aoqi@0: * @param value returned array of shorts.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_short_array(short[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of unsigned shorts from this input stream.
aoqi@0: * @param value returned array of shorts.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_ushort_array(short[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of CORBA longs (that is, Java ints) from this input stream.
aoqi@0: * @param value returned array of CORBA longs (that is, Java ints).
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_long_array(int[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of unsigned CORBA longs (that is, Java ints) from this input
aoqi@0: stream.
aoqi@0: * @param value returned array of CORBA longs (that is, Java ints).
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_ulong_array(int[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of CORBA longlongs (that is, Java longs) from this input
aoqi@0: stream.
aoqi@0: * @param value returned array of CORBA longs (that is, Java longs).
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_longlong_array(long[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of unsigned CORBA longlongs (that is, Java longs) from this
aoqi@0: input stream.
aoqi@0: * @param value returned array of CORBA longs (that is, Java longs).
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_ulonglong_array(long[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of floats from this input stream.
aoqi@0: * @param value returned array of floats.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_float_array(float[] value, int offset, int
aoqi@0: length);
aoqi@0: /**
aoqi@0: * Reads an array of doubles from this input stream.
aoqi@0: * @param value returned array of doubles.
aoqi@0: * @param offset offset on the stream.
aoqi@0: * @param length length of buffer to read.
aoqi@0: */
aoqi@0: public abstract void read_double_array(double[] value, int offset, int
aoqi@0: length);
aoqi@0:
aoqi@0: /**
aoqi@0: * Reads a CORBA object from this input stream.
aoqi@0: *
aoqi@0: * @return the Object
instance read from this input stream.
aoqi@0: */
aoqi@0: public abstract org.omg.CORBA.Object read_Object();
aoqi@0: /**
aoqi@0: * Reads a TypeCode
from this input stream.
aoqi@0: *
aoqi@0: * @return the TypeCode
instance read from this input stream.
aoqi@0: */
aoqi@0: public abstract TypeCode read_TypeCode();
aoqi@0: /**
aoqi@0: * Reads an Any from this input stream.
aoqi@0: *
aoqi@0: * @return the Any
instance read from this input stream.
aoqi@0: */
aoqi@0: public abstract Any read_any();
aoqi@0:
aoqi@0: /**
aoqi@0: * Returns principal for invocation.
aoqi@0: * @return Principal for invocation.
aoqi@0: * @deprecated Deprecated by CORBA 2.2.
aoqi@0: */
aoqi@0: @Deprecated
aoqi@0: public Principal read_Principal() {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0:
aoqi@0:
aoqi@0: /**
aoqi@0: * @see portable
aoqi@0: * package comments for unimplemented features
aoqi@0: */
aoqi@0: public int read() throws java.io.IOException {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0:
aoqi@0: /**
aoqi@0: * Reads a BigDecimal number.
aoqi@0: * @return a java.math.BigDecimal number
aoqi@0: */
aoqi@0: public java.math.BigDecimal read_fixed() {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0:
aoqi@0: /**
aoqi@0: * Reads a CORBA context from the stream.
aoqi@0: * @return a CORBA context
aoqi@0: * @see portable
aoqi@0: * package comments for unimplemented features
aoqi@0: */
aoqi@0: public org.omg.CORBA.Context read_Context() {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0: /*
aoqi@0: * The following methods were added by orbos/98-04-03: Java to IDL
aoqi@0: * Mapping. These are used by RMI over IIOP.
aoqi@0: */
aoqi@0:
aoqi@0: /**
aoqi@0: * Unmarshals an object and returns a CORBA Object,
aoqi@0: * which is an instance of the class passed as its argument.
aoqi@0: * This class is the stub class of the expected type.
aoqi@0: *
aoqi@0: * @param clz The Class object for the stub class which
aoqi@0: * corresponds to the type that is statistically expected, or
aoqi@0: * the Class object for the RMI/IDL interface type that
aoqi@0: * is statistically expected.
aoqi@0: * @return an Object instance of clz read from this stream
aoqi@0: *
aoqi@0: * @see portable
aoqi@0: * package comments for unimplemented features
aoqi@0: */
aoqi@0: public org.omg.CORBA.Object read_Object(java.lang.Class
aoqi@0: clz) {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0:
aoqi@0: /**
aoqi@0: * Returns the ORB that created this InputStream.
aoqi@0: *
aoqi@0: * @return the ORB
object that created this stream
aoqi@0: *
aoqi@0: * @see portable
aoqi@0: * package comments for unimplemented features
aoqi@0: */
aoqi@0: public org.omg.CORBA.ORB orb() {
aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT();
aoqi@0: }
aoqi@0: }