DataOutputStream.java revision 608:7e06bf1dcb09
1/* 2 * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package org.omg.CORBA; 27 28/** Defines the methods used to write primitive data types to output streams 29* for marshalling custom value types. This interface is used by user 30* written custom marshalling code for custom value types. 31* @see org.omg.CORBA.DataInputStream 32* @see org.omg.CORBA.CustomMarshal 33*/ 34public interface DataOutputStream extends org.omg.CORBA.portable.ValueBase 35{ 36 /** 37 * Writes the Any value to the output stream. 38 * @param value The value to be written. 39 */ 40 void write_any (org.omg.CORBA.Any value); 41 42 /** 43 * Writes the boolean value to the output stream. 44 * @param value The value to be written. 45 */ 46 void write_boolean (boolean value); 47 48 /** 49 * Writes the IDL character value to the output stream. 50 * @param value The value to be written. 51 */ 52 void write_char (char value); 53 54 /** 55 * Writes the IDL wide character value to the output stream. 56 * @param value The value to be written. 57 */ 58 void write_wchar (char value); 59 60 /** 61 * Writes the IDL octet value (represented as a Java byte) to the output stream. 62 * @param value The value to be written. 63 */ 64 void write_octet (byte value); 65 66 /** 67 * Writes the IDL short value to the output stream. 68 * @param value The value to be written. 69 */ 70 void write_short (short value); 71 72 /** 73 * Writes the IDL unsigned short value (represented as a Java short 74 * value) to the output stream. 75 * @param value The value to be written. 76 */ 77 void write_ushort (short value); 78 79 /** 80 * Writes the IDL long value (represented as a Java int) to the output stream. 81 * @param value The value to be written. 82 */ 83 void write_long (int value); 84 85 /** 86 * Writes the IDL unsigned long value (represented as a Java int) to the output stream. 87 * @param value The value to be written. 88 */ 89 void write_ulong (int value); 90 91 /** 92 * Writes the IDL long long value (represented as a Java long) to the output stream. 93 * @param value The value to be written. 94 */ 95 void write_longlong (long value); 96 97 /** 98 * Writes the IDL unsigned long long value (represented as a Java long) 99 * to the output stream. 100 * @param value The value to be written. 101 */ 102 void write_ulonglong (long value); 103 104 /** 105 * Writes the IDL float value to the output stream. 106 * @param value The value to be written. 107 */ 108 void write_float (float value); 109 110 /** 111 * Writes the IDL double value to the output stream. 112 * @param value The value to be written. 113 */ 114 void write_double (double value); 115 116 // write_longdouble not supported by IDL/Java mapping 117 118 /** 119 * Writes the IDL string value to the output stream. 120 * @param value The value to be written. 121 */ 122 void write_string (String value); 123 124 /** 125 * Writes the IDL wide string value (represented as a Java String) to the output stream. 126 * @param value The value to be written. 127 */ 128 void write_wstring (String value); 129 130 /** 131 * Writes the IDL CORBA::Object value to the output stream. 132 * @param value The value to be written. 133 */ 134 void write_Object (org.omg.CORBA.Object value); 135 136 /** 137 * Writes the IDL Abstract interface type to the output stream. 138 * @param value The value to be written. 139 */ 140 void write_Abstract (java.lang.Object value); 141 142 /** 143 * Writes the IDL value type value to the output stream. 144 * @param value The value to be written. 145 */ 146 void write_Value (java.io.Serializable value); 147 148 /** 149 * Writes the typecode to the output stream. 150 * @param value The value to be written. 151 */ 152 void write_TypeCode (org.omg.CORBA.TypeCode value); 153 154 /** 155 * Writes the array of IDL Anys from offset for length elements to the 156 * output stream. 157 * @param seq The array to be written. 158 * @param offset The index into seq of the first element to write to the 159 * output stream. 160 * @param length The number of elements to write to the output stream. 161 */ 162 void write_any_array (org.omg.CORBA.Any[] seq, int offset, int length); 163 164 /** 165 * Writes the array of IDL booleans from offset for length elements to the 166 * output stream. 167 * @param seq The array to be written. 168 * @param offset The index into seq of the first element to write to the 169 * output stream. 170 * @param length The number of elements to write to the output stream. 171 */ 172 void write_boolean_array (boolean[] seq, int offset, int length); 173 174 /** 175 * Writes the array of IDL characters from offset for length elements to the 176 * output stream. 177 * @param seq The array to be written. 178 * @param offset The index into seq of the first element to write to the 179 * output stream. 180 * @param length The number of elements to write to the output stream. 181 */ 182 void write_char_array (char[] seq, int offset, int length); 183 184 /** 185 * Writes the array of IDL wide characters from offset for length elements to the 186 * output stream. 187 * @param seq The array to be written. 188 * @param offset The index into seq of the first element to write to the 189 * output stream. 190 * @param length The number of elements to write to the output stream. 191 */ 192 void write_wchar_array (char[] seq, int offset, int length); 193 194 /** 195 * Writes the array of IDL octets from offset for length elements to the 196 * output stream. 197 * @param seq The array to be written. 198 * @param offset The index into seq of the first element to write to the 199 * output stream. 200 * @param length The number of elements to write to the output stream. 201 */ 202 void write_octet_array (byte[] seq, int offset, int length); 203 204 /** 205 * Writes the array of IDL shorts from offset for length elements to the 206 * output stream. 207 * @param seq The array to be written. 208 * @param offset The index into seq of the first element to write to the 209 * output stream. 210 * @param length The number of elements to write to the output stream. 211 */ 212 void write_short_array (short[] seq, int offset, int length); 213 214 /** 215 * Writes the array of IDL unsigned shorts (represented as Java shorts) 216 * from offset for length elements to the output stream. 217 * @param seq The array to be written. 218 * @param offset The index into seq of the first element to write to the 219 * output stream. 220 * @param length The number of elements to write to the output stream. 221 */ 222 void write_ushort_array (short[] seq, int offset, int length); 223 224 /** 225 * Writes the array of IDL longs from offset for length elements to the 226 * output stream. 227 * @param seq The array to be written. 228 * @param offset The index into seq of the first element to write to the 229 * output stream. 230 * @param length The number of elements to write to the output stream. 231 */ 232 void write_long_array (int[] seq, int offset, int length); 233 234 /** 235 * Writes the array of IDL unsigned longs (represented as Java ints) 236 * from offset for length elements to the output stream. 237 * @param seq The array to be written. 238 * @param offset The index into seq of the first element to write to the 239 * output stream. 240 * @param length The number of elements to write to the output stream. 241 */ 242 void write_ulong_array (int[] seq, int offset, int length); 243 244 /** 245 * Writes the array of IDL unsigned long longs (represented as Java longs) 246 * from offset for length elements to the output stream. 247 * @param seq The array to be written. 248 * @param offset The index into seq of the first element to write to the 249 * output stream. 250 * @param length The number of elements to write to the output stream. 251 */ 252 void write_ulonglong_array (long[] seq, int offset, int length); 253 254 /** 255 * Writes the array of IDL long longs from offset for length elements to the 256 * output stream. 257 * @param seq The array to be written. 258 * @param offset The index into seq of the first element to write to the 259 * output stream. 260 * @param length The number of elements to write to the output stream. 261 */ 262 void write_longlong_array (long[] seq, int offset, int length); 263 264 /** 265 * Writes the array of IDL floats from offset for length elements to the 266 * output stream. 267 * @param seq The array to be written. 268 * @param offset The index into seq of the first element to write to the 269 * output stream. 270 * @param length The number of elements to write to the output stream. 271 */ 272 void write_float_array (float[] seq, int offset, int length); 273 274 /** 275 * Writes the array of IDL doubles from offset for length elements to the 276 * output stream. 277 * @param seq The array to be written. 278 * @param offset The index into seq of the first element to write to the 279 * output stream. 280 * @param length The number of elements to write to the output stream. 281 */ 282 void write_double_array (double[] seq, int offset, int length); 283} // interface DataOutputStream 284