001: /*
002: * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025: package org.omg.CORBA.portable;
026:
027: import org.omg.CORBA.TypeCode;
028: import org.omg.CORBA.Principal;
029: import org.omg.CORBA.Any;
030:
031: /**
032: * OuputStream is the Java API for writing IDL types
033: * to CDR marshal streams. These methods are used by the ORB to
034: * marshal IDL types as well as to insert IDL types into Anys.
035: * The <code>_array</code> versions of the methods can be directly
036: * used to write sequences and arrays of IDL types.
037: *
038: * @version 1.13, 04/22/98
039: * @since JDK1.2
040: */
041:
042: public abstract class OutputStream extends java.io.OutputStream {
043: /**
044: * Returns an input stream with the same buffer.
045: *@return an input stream with the same buffer.
046: */
047: public abstract InputStream create_input_stream();
048:
049: /**
050: * Writes a boolean value to this stream.
051: * @param value the value to be written.
052: */
053: public abstract void write_boolean(boolean value);
054:
055: /**
056: * Writes a char value to this stream.
057: * @param value the value to be written.
058: */
059: public abstract void write_char(char value);
060:
061: /**
062: * Writes a wide char value to this stream.
063: * @param value the value to be written.
064: */
065: public abstract void write_wchar(char value);
066:
067: /**
068: * Writes a CORBA octet (i.e. byte) value to this stream.
069: * @param value the value to be written.
070: */
071: public abstract void write_octet(byte value);
072:
073: /**
074: * Writes a short value to this stream.
075: * @param value the value to be written.
076: */
077: public abstract void write_short(short value);
078:
079: /**
080: * Writes an unsigned short value to this stream.
081: * @param value the value to be written.
082: */
083: public abstract void write_ushort(short value);
084:
085: /**
086: * Writes a CORBA long (i.e. Java int) value to this stream.
087: * @param value the value to be written.
088: */
089: public abstract void write_long(int value);
090:
091: /**
092: * Writes an unsigned CORBA long (i.e. Java int) value to this stream.
093: * @param value the value to be written.
094: */
095: public abstract void write_ulong(int value);
096:
097: /**
098: * Writes a CORBA longlong (i.e. Java long) value to this stream.
099: * @param value the value to be written.
100: */
101: public abstract void write_longlong(long value);
102:
103: /**
104: * Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
105: * @param value the value to be written.
106: */
107: public abstract void write_ulonglong(long value);
108:
109: /**
110: * Writes a float value to this stream.
111: * @param value the value to be written.
112: */
113: public abstract void write_float(float value);
114:
115: /**
116: * Writes a double value to this stream.
117: * @param value the value to be written.
118: */
119: public abstract void write_double(double value);
120:
121: /**
122: * Writes a string value to this stream.
123: * @param value the value to be written.
124: */
125: public abstract void write_string(String value);
126:
127: /**
128: * Writes a wide string value to this stream.
129: * @param value the value to be written.
130: */
131: public abstract void write_wstring(String value);
132:
133: /**
134: * Writes an array of booleans on this output stream.
135: * @param value the array to be written.
136: * @param offset offset on the stream.
137: * @param length length of buffer to write.
138: */
139: public abstract void write_boolean_array(boolean[] value,
140: int offset, int length);
141:
142: /**
143: * Writes an array of chars on this output stream.
144: * @param value the array to be written.
145: * @param offset offset on the stream.
146: * @param length length of buffer to write.
147: */
148: public abstract void write_char_array(char[] value, int offset,
149: int length);
150:
151: /**
152: * Writes an array of wide chars on this output stream.
153: * @param value the array to be written.
154: * @param offset offset on the stream.
155: * @param length length of buffer to write.
156: */
157: public abstract void write_wchar_array(char[] value, int offset,
158: int length);
159:
160: /**
161: * Writes an array of CORBA octets (bytes) on this output stream.
162: * @param value the array to be written.
163: * @param offset offset on the stream.
164: * @param length length of buffer to write.
165: */
166: public abstract void write_octet_array(byte[] value, int offset,
167: int length);
168:
169: /**
170: * Writes an array of shorts on this output stream.
171: * @param value the array to be written.
172: * @param offset offset on the stream.
173: * @param length length of buffer to write.
174: */
175: public abstract void write_short_array(short[] value, int offset,
176: int length);
177:
178: /**
179: * Writes an array of unsigned shorts on this output stream.
180: * @param value the array to be written.
181: * @param offset offset on the stream.
182: * @param length length of buffer to write.
183: */
184: public abstract void write_ushort_array(short[] value, int offset,
185: int length);
186:
187: /**
188: * Writes an array of CORBA longs (i.e. Java ints) on this output stream.
189: * @param value the array to be written.
190: * @param offset offset on the stream.
191: * @param length length of buffer to write.
192: */
193: public abstract void write_long_array(int[] value, int offset,
194: int length);
195:
196: /**
197: * Writes an array of unsigned CORBA longs (i.e. Java ints) on this output stream.
198: * @param value the array to be written.
199: * @param offset offset on the stream.
200: * @param length length of buffer to write.
201: */
202: public abstract void write_ulong_array(int[] value, int offset,
203: int length);
204:
205: /**
206: * Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
207: * @param value the array to be written.
208: * @param offset offset on the stream.
209: * @param length length of buffer to write.
210: */
211: public abstract void write_longlong_array(long[] value, int offset,
212: int length);
213:
214: /**
215: * Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
216: * @param value the array to be written.
217: * @param offset offset on the stream.
218: * @param length length of buffer to write.
219: */
220: public abstract void write_ulonglong_array(long[] value,
221: int offset, int length);
222:
223: /**
224: * Writes an array of floats on this output stream.
225: * @param value the array to be written.
226: * @param offset offset on the stream.
227: * @param length length of buffer to write.
228: */
229: public abstract void write_float_array(float[] value, int offset,
230: int length);
231:
232: /**
233: * Writes an array of doubles on this output stream.
234: * @param value the array to be written.
235: * @param offset offset on the stream.
236: * @param length length of buffer to write.
237: */
238: public abstract void write_double_array(double[] value, int offset,
239: int length);
240:
241: /**
242: * Writes a CORBA Object on this output stream.
243: * @param value the value to be written.
244: */
245: public abstract void write_Object(org.omg.CORBA.Object value);
246:
247: /**
248: * Writes a TypeCode on this output stream.
249: * @param value the value to be written.
250: */
251: public abstract void write_TypeCode(TypeCode value);
252:
253: /**
254: * Writes an Any on this output stream.
255: * @param value the value to be written.
256: */
257: public abstract void write_any(Any value);
258:
259: /**
260: * Writes a Principle on this output stream.
261: * @param value the value to be written.
262: * @deprecated Deprecated by CORBA 2.2.
263: */
264: @Deprecated
265: public void write_Principal(Principal value) {
266: throw new org.omg.CORBA.NO_IMPLEMENT();
267: }
268:
269: /**
270: * Writes an integer (length of arrays) onto this stream.
271: * @param b the value to be written.
272: * @throws java.io.IOException if there is an input/output error
273: * @see <a href="package-summary.html#unimpl"><code>portable</code>
274: * package comments for unimplemented features</a>
275: */
276: public void write(int b) throws java.io.IOException {
277: throw new org.omg.CORBA.NO_IMPLEMENT();
278: }
279:
280: /**
281: * Writes a BigDecimal number.
282: * @param value a BidDecimal--value to be written.
283: */
284: public void write_fixed(java.math.BigDecimal value) {
285: throw new org.omg.CORBA.NO_IMPLEMENT();
286: }
287:
288: /**
289: * Writes a CORBA context on this stream. The
290: * Context is marshaled as a sequence of strings.
291: * Only those Context values specified in the contexts
292: * parameter are actually written.
293: * @param ctx a CORBA context
294: * @param contexts a <code>ContextList</code> object containing the list of contexts
295: * to be written
296: * @see <a href="package-summary.html#unimpl"><code>portable</code>
297: * package comments for unimplemented features</a>
298: */
299: public void write_Context(org.omg.CORBA.Context ctx,
300: org.omg.CORBA.ContextList contexts) {
301: throw new org.omg.CORBA.NO_IMPLEMENT();
302: }
303:
304: /**
305: * Returns the ORB that created this OutputStream.
306: * @return the ORB that created this OutputStream
307: * @see <a href="package-summary.html#unimpl"><code>portable</code>
308: * package comments for unimplemented features</a>
309: */
310: public org.omg.CORBA.ORB orb() {
311: throw new org.omg.CORBA.NO_IMPLEMENT();
312: }
313: }
|