src/share/classes/org/omg/CORBA/portable/OutputStream.java

Mon, 14 Jun 2010 11:28:53 -0700

author
jjg
date
Mon, 14 Jun 2010 11:28:53 -0700
changeset 173
032585ad970d
parent 158
91006f157c46
child 748
6845b95cba6b
permissions
-rw-r--r--

6960831: fix CORBA build warnings
Reviewed-by: darcy

duke@1 1 /*
ohair@158 2 * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
ohair@158 7 * published by the Free Software Foundation. Oracle designates this
duke@1 8 * particular file as subject to the "Classpath" exception as provided
ohair@158 9 * by Oracle in the LICENSE file that accompanied this code.
duke@1 10 *
duke@1 11 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 14 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 15 * accompanied this code).
duke@1 16 *
duke@1 17 * You should have received a copy of the GNU General Public License version
duke@1 18 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 20 *
ohair@158 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@158 22 * or visit www.oracle.com if you need additional information or have any
ohair@158 23 * questions.
duke@1 24 */
duke@1 25 package org.omg.CORBA.portable;
duke@1 26
duke@1 27 import org.omg.CORBA.TypeCode;
duke@1 28 import org.omg.CORBA.Principal;
duke@1 29 import org.omg.CORBA.Any;
duke@1 30
duke@1 31 /**
duke@1 32 * OuputStream is the Java API for writing IDL types
duke@1 33 * to CDR marshal streams. These methods are used by the ORB to
duke@1 34 * marshal IDL types as well as to insert IDL types into Anys.
duke@1 35 * The <code>_array</code> versions of the methods can be directly
duke@1 36 * used to write sequences and arrays of IDL types.
duke@1 37 *
duke@1 38 * @since JDK1.2
duke@1 39 */
duke@1 40
duke@1 41
duke@1 42 public abstract class OutputStream extends java.io.OutputStream
duke@1 43 {
duke@1 44 /**
duke@1 45 * Returns an input stream with the same buffer.
duke@1 46 *@return an input stream with the same buffer.
duke@1 47 */
duke@1 48 public abstract InputStream create_input_stream();
duke@1 49
duke@1 50 /**
duke@1 51 * Writes a boolean value to this stream.
duke@1 52 * @param value the value to be written.
duke@1 53 */
duke@1 54 public abstract void write_boolean(boolean value);
duke@1 55 /**
duke@1 56 * Writes a char value to this stream.
duke@1 57 * @param value the value to be written.
duke@1 58 */
duke@1 59 public abstract void write_char(char value);
duke@1 60 /**
duke@1 61 * Writes a wide char value to this stream.
duke@1 62 * @param value the value to be written.
duke@1 63 */
duke@1 64 public abstract void write_wchar(char value);
duke@1 65 /**
duke@1 66 * Writes a CORBA octet (i.e. byte) value to this stream.
duke@1 67 * @param value the value to be written.
duke@1 68 */
duke@1 69 public abstract void write_octet(byte value);
duke@1 70 /**
duke@1 71 * Writes a short value to this stream.
duke@1 72 * @param value the value to be written.
duke@1 73 */
duke@1 74 public abstract void write_short(short value);
duke@1 75 /**
duke@1 76 * Writes an unsigned short value to this stream.
duke@1 77 * @param value the value to be written.
duke@1 78 */
duke@1 79 public abstract void write_ushort(short value);
duke@1 80 /**
duke@1 81 * Writes a CORBA long (i.e. Java int) value to this stream.
duke@1 82 * @param value the value to be written.
duke@1 83 */
duke@1 84 public abstract void write_long(int value);
duke@1 85 /**
duke@1 86 * Writes an unsigned CORBA long (i.e. Java int) value to this stream.
duke@1 87 * @param value the value to be written.
duke@1 88 */
duke@1 89 public abstract void write_ulong(int value);
duke@1 90 /**
duke@1 91 * Writes a CORBA longlong (i.e. Java long) value to this stream.
duke@1 92 * @param value the value to be written.
duke@1 93 */
duke@1 94 public abstract void write_longlong(long value);
duke@1 95 /**
duke@1 96 * Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
duke@1 97 * @param value the value to be written.
duke@1 98 */
duke@1 99 public abstract void write_ulonglong(long value);
duke@1 100 /**
duke@1 101 * Writes a float value to this stream.
duke@1 102 * @param value the value to be written.
duke@1 103 */
duke@1 104 public abstract void write_float(float value);
duke@1 105 /**
duke@1 106 * Writes a double value to this stream.
duke@1 107 * @param value the value to be written.
duke@1 108 */
duke@1 109 public abstract void write_double(double value);
duke@1 110 /**
duke@1 111 * Writes a string value to this stream.
duke@1 112 * @param value the value to be written.
duke@1 113 */
duke@1 114 public abstract void write_string(String value);
duke@1 115 /**
duke@1 116 * Writes a wide string value to this stream.
duke@1 117 * @param value the value to be written.
duke@1 118 */
duke@1 119 public abstract void write_wstring(String value);
duke@1 120
duke@1 121 /**
duke@1 122 * Writes an array of booleans on this output stream.
duke@1 123 * @param value the array to be written.
duke@1 124 * @param offset offset on the stream.
duke@1 125 * @param length length of buffer to write.
duke@1 126 */
duke@1 127 public abstract void write_boolean_array(boolean[] value, int offset,
duke@1 128 int length);
duke@1 129 /**
duke@1 130 * Writes an array of chars on this output stream.
duke@1 131 * @param value the array to be written.
duke@1 132 * @param offset offset on the stream.
duke@1 133 * @param length length of buffer to write.
duke@1 134 */
duke@1 135 public abstract void write_char_array(char[] value, int offset,
duke@1 136 int length);
duke@1 137 /**
duke@1 138 * Writes an array of wide chars on this output stream.
duke@1 139 * @param value the array to be written.
duke@1 140 * @param offset offset on the stream.
duke@1 141 * @param length length of buffer to write.
duke@1 142 */
duke@1 143 public abstract void write_wchar_array(char[] value, int offset,
duke@1 144 int length);
duke@1 145 /**
duke@1 146 * Writes an array of CORBA octets (bytes) on this output stream.
duke@1 147 * @param value the array to be written.
duke@1 148 * @param offset offset on the stream.
duke@1 149 * @param length length of buffer to write.
duke@1 150 */
duke@1 151 public abstract void write_octet_array(byte[] value, int offset,
duke@1 152 int length);
duke@1 153 /**
duke@1 154 * Writes an array of shorts on this output stream.
duke@1 155 * @param value the array to be written.
duke@1 156 * @param offset offset on the stream.
duke@1 157 * @param length length of buffer to write.
duke@1 158 */
duke@1 159 public abstract void write_short_array(short[] value, int offset,
duke@1 160 int length);
duke@1 161 /**
duke@1 162 * Writes an array of unsigned shorts on this output stream.
duke@1 163 * @param value the array to be written.
duke@1 164 * @param offset offset on the stream.
duke@1 165 * @param length length of buffer to write.
duke@1 166 */
duke@1 167 public abstract void write_ushort_array(short[] value, int offset,
duke@1 168 int length);
duke@1 169 /**
duke@1 170 * Writes an array of CORBA longs (i.e. Java ints) on this output stream.
duke@1 171 * @param value the array to be written.
duke@1 172 * @param offset offset on the stream.
duke@1 173 * @param length length of buffer to write.
duke@1 174 */
duke@1 175 public abstract void write_long_array(int[] value, int offset,
duke@1 176 int length);
duke@1 177 /**
duke@1 178 * Writes an array of unsigned CORBA longs (i.e. Java ints) on this output stream.
duke@1 179 * @param value the array to be written.
duke@1 180 * @param offset offset on the stream.
duke@1 181 * @param length length of buffer to write.
duke@1 182 */
duke@1 183 public abstract void write_ulong_array(int[] value, int offset,
duke@1 184 int length);
duke@1 185 /**
duke@1 186 * Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
duke@1 187 * @param value the array to be written.
duke@1 188 * @param offset offset on the stream.
duke@1 189 * @param length length of buffer to write.
duke@1 190 */
duke@1 191 public abstract void write_longlong_array(long[] value, int offset,
duke@1 192 int length);
duke@1 193 /**
duke@1 194 * Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
duke@1 195 * @param value the array to be written.
duke@1 196 * @param offset offset on the stream.
duke@1 197 * @param length length of buffer to write.
duke@1 198 */
duke@1 199 public abstract void write_ulonglong_array(long[] value, int offset,
duke@1 200 int length);
duke@1 201 /**
duke@1 202 * Writes an array of floats on this output stream.
duke@1 203 * @param value the array to be written.
duke@1 204 * @param offset offset on the stream.
duke@1 205 * @param length length of buffer to write.
duke@1 206 */
duke@1 207 public abstract void write_float_array(float[] value, int offset,
duke@1 208 int length);
duke@1 209 /**
duke@1 210 * Writes an array of doubles on this output stream.
duke@1 211 * @param value the array to be written.
duke@1 212 * @param offset offset on the stream.
duke@1 213 * @param length length of buffer to write.
duke@1 214 */
duke@1 215 public abstract void write_double_array(double[] value, int offset,
duke@1 216 int length);
duke@1 217 /**
duke@1 218 * Writes a CORBA Object on this output stream.
duke@1 219 * @param value the value to be written.
duke@1 220 */
duke@1 221 public abstract void write_Object(org.omg.CORBA.Object value);
duke@1 222 /**
duke@1 223 * Writes a TypeCode on this output stream.
duke@1 224 * @param value the value to be written.
duke@1 225 */
duke@1 226 public abstract void write_TypeCode(TypeCode value);
duke@1 227 /**
duke@1 228 * Writes an Any on this output stream.
duke@1 229 * @param value the value to be written.
duke@1 230 */
duke@1 231 public abstract void write_any(Any value);
duke@1 232
duke@1 233 /**
duke@1 234 * Writes a Principle on this output stream.
duke@1 235 * @param value the value to be written.
duke@1 236 * @deprecated Deprecated by CORBA 2.2.
duke@1 237 */
duke@1 238 @Deprecated
duke@1 239 public void write_Principal(Principal value) {
duke@1 240 throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1 241 }
duke@1 242
duke@1 243 /**
duke@1 244 * Writes an integer (length of arrays) onto this stream.
duke@1 245 * @param b the value to be written.
duke@1 246 * @throws java.io.IOException if there is an input/output error
duke@1 247 * @see <a href="package-summary.html#unimpl"><code>portable</code>
duke@1 248 * package comments for unimplemented features</a>
duke@1 249 */
duke@1 250 public void write(int b) throws java.io.IOException {
duke@1 251 throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1 252 }
duke@1 253
duke@1 254 /**
duke@1 255 * Writes a BigDecimal number.
duke@1 256 * @param value a BidDecimal--value to be written.
duke@1 257 */
duke@1 258 public void write_fixed(java.math.BigDecimal value) {
duke@1 259 throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1 260 }
duke@1 261
duke@1 262 /**
duke@1 263 * Writes a CORBA context on this stream. The
duke@1 264 * Context is marshaled as a sequence of strings.
duke@1 265 * Only those Context values specified in the contexts
duke@1 266 * parameter are actually written.
duke@1 267 * @param ctx a CORBA context
duke@1 268 * @param contexts a <code>ContextList</code> object containing the list of contexts
duke@1 269 * to be written
duke@1 270 * @see <a href="package-summary.html#unimpl"><code>portable</code>
duke@1 271 * package comments for unimplemented features</a>
duke@1 272 */
duke@1 273 public void write_Context(org.omg.CORBA.Context ctx,
duke@1 274 org.omg.CORBA.ContextList contexts) {
duke@1 275 throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1 276 }
duke@1 277
duke@1 278 /**
duke@1 279 * Returns the ORB that created this OutputStream.
duke@1 280 * @return the ORB that created this OutputStream
duke@1 281 * @see <a href="package-summary.html#unimpl"><code>portable</code>
duke@1 282 * package comments for unimplemented features</a>
duke@1 283 */
duke@1 284 public org.omg.CORBA.ORB orb() {
duke@1 285 throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1 286 }
duke@1 287 }

mercurial