001    /* DataOutputStream.java --
002       Copyright (C) 2005, 2006 Free Software Foundation, Inc.
003    
004    This file is part of GNU Classpath.
005    
006    GNU Classpath is free software; you can redistribute it and/or modify
007    it under the terms of the GNU General Public License as published by
008    the Free Software Foundation; either version 2, or (at your option)
009    any later version.
010    
011    GNU Classpath is distributed in the hope that it will be useful, but
012    WITHOUT ANY WARRANTY; without even the implied warranty of
013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014    General Public License for more details.
015    
016    You should have received a copy of the GNU General Public License
017    along with GNU Classpath; see the file COPYING.  If not, write to the
018    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
019    02110-1301 USA.
020    
021    Linking this library statically or dynamically with other modules is
022    making a combined work based on this library.  Thus, the terms and
023    conditions of the GNU General Public License cover the whole
024    combination.
025    
026    As a special exception, the copyright holders of this library give you
027    permission to link this library with independent modules to produce an
028    executable, regardless of the license terms of these independent
029    modules, and to copy and distribute the resulting executable under
030    terms of your choice, provided that you also meet, for each linked
031    independent module, the terms and conditions of the license of that
032    module.  An independent module is a module which is not derived from
033    or based on this library.  If you modify this library, you may extend
034    this exception to your version of the library, but you are not
035    obligated to do so.  If you do not wish to do so, delete this
036    exception statement from your version. */
037    
038    
039    package org.omg.CORBA;
040    
041    import org.omg.CORBA.portable.ValueBase;
042    
043    /**
044     * An interface for writing the custom value types. A value type, providing
045     * its own mechanism for writing the content, must implement
046     * the {@link CustomValue} that uses this interface.
047     *
048     * @see CustomValue
049     * @see CustomMarshal
050     *
051     * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
052     */
053    public interface DataOutputStream
054      extends ValueBase
055    {
056      /**
057       * Write {@link Any} to the output stream.
058       *
059       * @param value a value to write.
060       */
061      void write_any(Any value);
062    
063      /**
064       * Write boolean to the output stream.
065       *
066       * @param value a value to write.
067       */
068      void write_boolean(boolean value);
069    
070      /**
071       * Write narrow (usually 8 bit) char to the output stream.
072       *
073       * @param value a value to write.
074       */
075      void write_char(char value);
076    
077      /**
078       * Write wide (usually 16 bit) char to the output stream.
079       *
080       * @param value a value to write.
081       */
082      void write_wchar(char value);
083    
084      /**
085       * Write octet (byte) to the output stream.
086       *
087       * @param value a value to write.
088       */
089      void write_octet(byte value);
090    
091      /**
092       * Write short (16 bit signed integer) to the output stream.
093       *
094       * @param value a value to write.
095       */
096      void write_short(short value);
097    
098      /**
099       * Write unsigned short to the output stream.
100       *
101       * @param value a value to write.
102       */
103      void write_ushort(short value);
104    
105      /**
106       * Write CORBA long (32 bits, java int) to the output stream.
107       *
108       * @param value a value to write.
109       */
110      void write_long(int value);
111    
112      /**
113       * Write unsigned CORBA long (32 bits, java int) to the output stream.
114       *
115       * @param value a value to write.
116       */
117      void write_ulong(int value);
118    
119      /**
120       * Write CORBA long long (64 bits, java long) to the output stream.
121       *
122       * @param value a value to write.
123       */
124      void write_longlong(long value);
125    
126      /**
127       * Write unsigned CORBA long long (64 bits, java long) to the output stream.
128       *
129       * @param value a value to write.
130       */
131      void write_ulonglong(long value);
132    
133      /**
134       * Write float to the output stream.
135       *
136       * @param value a value to write.
137       */
138      void write_float(float value);
139    
140      /**
141       * Write double to the output stream.
142       *
143       * @param value a value to write.
144       */
145      void write_double(double value);
146    
147      /**
148       * Write narrow (usually 8 bits per character) string to the output stream.
149       *
150       * @param value a value to write.
151       */
152      void write_string(String value);
153    
154      /**
155       * Write wide (usually 16 bits per character) string to the output stream.
156       *
157       * @param value a value to write.
158       */
159      void write_wstring(String value);
160    
161      /**
162       * Write CORBA object reference to the output stream.
163       *
164       * @param value a value to write, null should be supported.
165       */
166      void write_Object(org.omg.CORBA.Object value);
167    
168      /**
169       * Write abstract interface to the output stream.
170       *
171       * @param value a value to write, can be either CORBA object or
172       * CORBA value type.
173       */
174      void write_Abstract(java.lang.Object value);
175    
176      /**
177       * Write value type to the output stream.
178       *
179       * @param value a value to write.
180       */
181      void write_Value(java.io.Serializable value);
182    
183      /**
184       * Write typecode to the output stream.
185       *
186       * @param value a value to write.
187       */
188      void write_TypeCode(TypeCode value);
189    
190      /**
191       * Write array of Any's to the output stream.
192       *
193       * @param seq a value to write.
194       */
195      void write_any_array(Any[] seq, int offset, int length);
196    
197      /**
198       * Write array of boolean's to the output stream.
199       *
200       * @param seq a value to write.
201       */
202      void write_boolean_array(boolean[] seq, int offset, int length);
203    
204      /**
205       * Write array of narrow chars to the output stream.
206       *
207       * @param seq a value to write.
208       */
209      void write_char_array(char[] seq, int offset, int length);
210    
211      /**
212       * Write array of wide chars to the output stream.
213       *
214       * @param seq a value to write.
215       */
216      void write_wchar_array(char[] seq, int offset, int length);
217    
218      /**
219       * Write array of octets (bytes) to the output stream.
220       *
221       * @param seq a value to write.
222       */
223      void write_octet_array(byte[] seq, int offset, int length);
224    
225      /**
226       * Write array of shorts (16 bit integers) to the output stream.
227       *
228       * @param seq a value to write.
229       */
230      void write_short_array(short[] seq, int offset, int length);
231    
232      /**
233       * Write array of unsigned shorts (16 bit integers) to the output stream.
234       *
235       * @param seq a value to write.
236       */
237      void write_ushort_array(short[] seq, int offset, int length);
238    
239      /**
240       * Write array of CORBA longs (java ints) to the output stream.
241       *
242       * @param seq a value to write.
243       */
244      void write_long_array(int[] seq, int offset, int length);
245    
246      /**
247       * Write array of unsigned CORBA longs (java ints) to the output stream.
248       *
249       * @param seq a value to write.
250       */
251      void write_ulong_array(int[] seq, int offset, int length);
252    
253      /**
254       * Write array of unsigned CORBA long longs (java longs)
255       * to the output stream.
256       *
257       * @param seq a value to write.
258       */
259      void write_ulonglong_array(long[] seq, int offset, int length);
260    
261      /**
262       * Write arrayo fo CORBA long longs (java ints) to the output stream.
263       *
264       * @param seq a value to write.
265       */
266      void write_longlong_array(long[] seq, int offset, int length);
267    
268      /**
269       * Write array of floats to the output stream.
270       *
271       * @param seq a value to write.
272       */
273      void write_float_array(float[] seq, int offset, int length);
274    
275      /**
276       * Write array of doubles to the output stream.
277       *
278       * @param seq a value to write.
279       */
280      void write_double_array(double[] seq, int offset, int length);
281    }