duke@1: /* duke@1: * Copyright 1998-1999 Sun Microsystems, Inc. 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 duke@1: * published by the Free Software Foundation. Sun designates this duke@1: * particular file as subject to the "Classpath" exception as provided duke@1: * by Sun 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: * duke@1: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@1: * CA 95054 USA or visit www.sun.com if you need additional information or duke@1: * have any questions. duke@1: */ duke@1: duke@1: package org.omg.CORBA; duke@1: duke@1: /** Defines the methods used to write primitive data types to output streams duke@1: * for marshalling custom value types. This interface is used by user duke@1: * written custom marshalling code for custom value types. duke@1: * @see org.omg.CORBA.DataInputStream duke@1: * @see org.omg.CORBA.CustomMarshal duke@1: */ duke@1: public interface DataOutputStream extends org.omg.CORBA.portable.ValueBase duke@1: { duke@1: /** duke@1: * Writes the Any value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_any (org.omg.CORBA.Any value); duke@1: duke@1: /** duke@1: * Writes the boolean value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_boolean (boolean value); duke@1: duke@1: /** duke@1: * Writes the IDL character value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_char (char value); duke@1: duke@1: /** duke@1: * Writes the IDL wide character value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_wchar (char value); duke@1: duke@1: /** duke@1: * Writes the IDL octet value (represented as a Java byte) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_octet (byte value); duke@1: duke@1: /** duke@1: * Writes the IDL short value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_short (short value); duke@1: duke@1: /** duke@1: * Writes the IDL unsigned short value (represented as a Java short duke@1: * value) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_ushort (short value); duke@1: duke@1: /** duke@1: * Writes the IDL long value (represented as a Java int) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_long (int value); duke@1: duke@1: /** duke@1: * Writes the IDL unsigned long value (represented as a Java int) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_ulong (int value); duke@1: duke@1: /** duke@1: * Writes the IDL long long value (represented as a Java long) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_longlong (long value); duke@1: duke@1: /** duke@1: * Writes the IDL unsigned long long value (represented as a Java long) duke@1: * to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_ulonglong (long value); duke@1: duke@1: /** duke@1: * Writes the IDL float value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_float (float value); duke@1: duke@1: /** duke@1: * Writes the IDL double value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_double (double value); duke@1: duke@1: // write_longdouble not supported by IDL/Java mapping duke@1: duke@1: /** duke@1: * Writes the IDL string value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_string (String value); duke@1: duke@1: /** duke@1: * Writes the IDL wide string value (represented as a Java String) to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_wstring (String value); duke@1: duke@1: /** duke@1: * Writes the IDL CORBA::Object value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_Object (org.omg.CORBA.Object value); duke@1: duke@1: /** duke@1: * Writes the IDL Abstract interface type to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_Abstract (java.lang.Object value); duke@1: duke@1: /** duke@1: * Writes the IDL value type value to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_Value (java.io.Serializable value); duke@1: duke@1: /** duke@1: * Writes the typecode to the output stream. duke@1: * @param value The value to be written. duke@1: */ duke@1: void write_TypeCode (org.omg.CORBA.TypeCode value); duke@1: duke@1: /** duke@1: * Writes the array of IDL Anys from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_any_array (org.omg.CORBA.Any[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL booleans from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_boolean_array (boolean[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL characters from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_char_array (char[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL wide characters from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_wchar_array (char[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL octets from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_octet_array (byte[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL shorts from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_short_array (short[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL unsigned shorts (represented as Java shorts) duke@1: * from offset for length elements to the output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_ushort_array (short[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL longs from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_long_array (int[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL unsigned longs (represented as Java ints) duke@1: * from offset for length elements to the output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_ulong_array (int[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL unsigned long longs (represented as Java longs) duke@1: * from offset for length elements to the output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_ulonglong_array (long[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL long longs from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_longlong_array (long[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL floats from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_float_array (float[] seq, int offset, int length); duke@1: duke@1: /** duke@1: * Writes the array of IDL doubles from offset for length elements to the duke@1: * output stream. duke@1: * @param seq The array to be written. duke@1: * @param offset The index into seq of the first element to write to the duke@1: * output stream. duke@1: * @param length The number of elements to write to the output stream. duke@1: */ duke@1: void write_double_array (double[] seq, int offset, int length); duke@1: } // interface DataOutputStream