duke@1: /* ohair@158: * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@158: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@158: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@158: * or visit www.oracle.com if you need additional information or have any ohair@158: * questions. duke@1: */ duke@1: duke@1: package org.omg.CORBA; duke@1: duke@1: /** Defines the methods used to read primitive data types from input streams duke@1: * for unmarshaling custom value types. This interface is used by user duke@1: * written custom unmarshaling code for custom value types. duke@1: * @see org.omg.CORBA.DataOutputStream duke@1: * @see org.omg.CORBA.CustomMarshal duke@1: */ duke@1: public interface DataInputStream extends org.omg.CORBA.portable.ValueBase duke@1: { duke@1: /** Reads an IDL Any value from the input stream. duke@1: * @return the Any read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: org.omg.CORBA.Any read_any (); duke@1: duke@1: /** Reads an IDL boolean value from the input stream. duke@1: * @return the boolean read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: boolean read_boolean (); duke@1: duke@1: /** Reads an IDL character value from the input stream. duke@1: * @return the character read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: char read_char (); duke@1: duke@1: /** Reads an IDL wide character value from the input stream. duke@1: * @return the wide character read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: char read_wchar (); duke@1: duke@1: /** Reads an IDL octet value from the input stream. duke@1: * @return the octet value read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: byte read_octet (); duke@1: duke@1: /** Reads an IDL short from the input stream. duke@1: * @return the short read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: short read_short (); duke@1: duke@1: /** Reads an IDL unsigned short from the input stream. duke@1: * @return the unsigned short read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: short read_ushort (); duke@1: duke@1: /** Reads an IDL long from the input stream. duke@1: * @return the long read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: int read_long (); duke@1: duke@1: /** Reads an IDL unsigned long from the input stream. duke@1: * @return the unsigned long read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: int read_ulong (); duke@1: duke@1: /** Reads an IDL long long from the input stream. duke@1: * @return the long long read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: long read_longlong (); duke@1: duke@1: /** Reads an unsigned IDL long long from the input stream. duke@1: * @return the unsigned long long read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: long read_ulonglong (); duke@1: duke@1: /** Reads an IDL float from the input stream. duke@1: * @return the float read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: float read_float (); duke@1: duke@1: /** Reads an IDL double from the input stream. duke@1: * @return the double read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: double read_double (); duke@1: // read_longdouble not supported by IDL/Java mapping duke@1: duke@1: /** Reads an IDL string from the input stream. duke@1: * @return the string read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: String read_string (); duke@1: duke@1: /** Reads an IDL wide string from the input stream. duke@1: * @return the wide string read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: String read_wstring (); duke@1: duke@1: /** Reads an IDL CORBA::Object from the input stream. duke@1: * @return the CORBA::Object read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: org.omg.CORBA.Object read_Object (); duke@1: duke@1: /** Reads an IDL Abstract interface from the input stream. duke@1: * @return the Abstract interface read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: java.lang.Object read_Abstract (); duke@1: duke@1: /** Reads an IDL value type from the input stream. duke@1: * @return the value type read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: java.io.Serializable read_Value (); duke@1: duke@1: /** Reads an IDL typecode from the input stream. duke@1: * @return the typecode read. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: org.omg.CORBA.TypeCode read_TypeCode (); duke@1: duke@1: /** Reads array of IDL Anys from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_any_array (org.omg.CORBA.AnySeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL booleans from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_boolean_array (org.omg.CORBA.BooleanSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL characters from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_char_array (org.omg.CORBA.CharSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL wide characters from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_wchar_array (org.omg.CORBA.WCharSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL octets from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_octet_array (org.omg.CORBA.OctetSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL shorts from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_short_array (org.omg.CORBA.ShortSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL unsigned shorts from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_ushort_array (org.omg.CORBA.UShortSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL longs from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_long_array (org.omg.CORBA.LongSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL unsigned longs from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_ulong_array (org.omg.CORBA.ULongSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL unsigned long longs from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_ulonglong_array (org.omg.CORBA.ULongLongSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL long longs from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_longlong_array (org.omg.CORBA.LongLongSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL floats from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_float_array (org.omg.CORBA.FloatSeqHolder seq, int offset, int length); duke@1: duke@1: /** Reads array of IDL doubles from offset for length elements from the duke@1: * input stream. duke@1: * @param seq The out parameter holder for the array to be read. duke@1: * @param offset The index into seq of the first element to read from the duke@1: * input stream. duke@1: * @param length The number of elements to read from the input stream. duke@1: * @throws org.omg.CORBA.MARSHAL duke@1: * If an inconsistency is detected, including not having registered duke@1: * a streaming policy, then the standard system exception MARSHAL is raised. duke@1: */ duke@1: void read_double_array (org.omg.CORBA.DoubleSeqHolder seq, int offset, int length); duke@1: } // interface DataInputStream