KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > portable > OutputStream


1 /*
2  * @(#)OutputStream.java 1.34 04/05/18
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package org.omg.CORBA.portable;
8
9 import org.omg.CORBA.TypeCode JavaDoc;
10 import org.omg.CORBA.Principal JavaDoc;
11 import org.omg.CORBA.Any JavaDoc;
12
13 /**
14  * OuputStream is the Java API for writing IDL types
15  * to CDR marshal streams. These methods are used by the ORB to
16  * marshal IDL types as well as to insert IDL types into Anys.
17  * The <code>_array</code> versions of the methods can be directly
18  * used to write sequences and arrays of IDL types.
19  *
20  * @version 1.13, 04/22/98
21  * @since JDK1.2
22  */

23
24
25 public abstract class OutputStream extends java.io.OutputStream JavaDoc
26 {
27     /**
28      * Returns an input stream with the same buffer.
29      *@return an input stream with the same buffer.
30      */

31     public abstract InputStream JavaDoc create_input_stream();
32
33     /**
34      * Writes a boolean value to this stream.
35      * @param value the value to be written.
36      */

37     public abstract void write_boolean(boolean value);
38     /**
39      * Writes a char value to this stream.
40      * @param value the value to be written.
41      */

42     public abstract void write_char(char value);
43     /**
44      * Writes a wide char value to this stream.
45      * @param value the value to be written.
46      */

47     public abstract void write_wchar(char value);
48     /**
49      * Writes a CORBA octet (i.e. byte) value to this stream.
50      * @param value the value to be written.
51      */

52     public abstract void write_octet(byte value);
53     /**
54      * Writes a short value to this stream.
55      * @param value the value to be written.
56      */

57     public abstract void write_short(short value);
58     /**
59      * Writes an unsigned short value to this stream.
60      * @param value the value to be written.
61      */

62     public abstract void write_ushort(short value);
63     /**
64      * Writes a CORBA long (i.e. Java int) value to this stream.
65      * @param value the value to be written.
66      */

67     public abstract void write_long(int value);
68     /**
69      * Writes an unsigned CORBA long (i.e. Java int) value to this stream.
70      * @param value the value to be written.
71      */

72     public abstract void write_ulong(int value);
73     /**
74      * Writes a CORBA longlong (i.e. Java long) value to this stream.
75      * @param value the value to be written.
76      */

77     public abstract void write_longlong(long value);
78     /**
79      * Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
80      * @param value the value to be written.
81      */

82     public abstract void write_ulonglong(long value);
83     /**
84      * Writes a float value to this stream.
85      * @param value the value to be written.
86      */

87     public abstract void write_float(float value);
88     /**
89      * Writes a double value to this stream.
90      * @param value the value to be written.
91      */

92     public abstract void write_double(double value);
93     /**
94      * Writes a string value to this stream.
95      * @param value the value to be written.
96      */

97     public abstract void write_string(String JavaDoc value);
98     /**
99      * Writes a wide string value to this stream.
100      * @param value the value to be written.
101      */

102     public abstract void write_wstring(String JavaDoc value);
103
104     /**
105      * Writes an array of booleans on this output stream.
106      * @param value the array to be written.
107      * @param offset offset on the stream.
108      * @param length length of buffer to write.
109      */

110     public abstract void write_boolean_array(boolean[] value, int offset,
111                          int length);
112     /**
113      * Writes an array of chars on this output stream.
114      * @param value the array to be written.
115      * @param offset offset on the stream.
116      * @param length length of buffer to write.
117      */

118     public abstract void write_char_array(char[] value, int offset,
119                       int length);
120     /**
121      * Writes an array of wide chars on this output stream.
122      * @param value the array to be written.
123      * @param offset offset on the stream.
124      * @param length length of buffer to write.
125      */

126     public abstract void write_wchar_array(char[] value, int offset,
127                        int length);
128     /**
129      * Writes an array of CORBA octets (bytes) on this output stream.
130      * @param value the array to be written.
131      * @param offset offset on the stream.
132      * @param length length of buffer to write.
133      */

134     public abstract void write_octet_array(byte[] value, int offset,
135                        int length);
136     /**
137      * Writes an array of shorts on this output stream.
138      * @param value the array to be written.
139      * @param offset offset on the stream.
140      * @param length length of buffer to write.
141      */

142     public abstract void write_short_array(short[] value, int offset,
143                        int length);
144     /**
145      * Writes an array of unsigned shorts on this output stream.
146      * @param value the array to be written.
147      * @param offset offset on the stream.
148      * @param length length of buffer to write.
149      */

150     public abstract void write_ushort_array(short[] value, int offset,
151                         int length);
152     /**
153      * Writes an array of CORBA longs (i.e. Java ints) on this output stream.
154      * @param value the array to be written.
155      * @param offset offset on the stream.
156      * @param length length of buffer to write.
157      */

158     public abstract void write_long_array(int[] value, int offset,
159                       int length);
160     /**
161      * Writes an array of unsigned CORBA longs (i.e. Java ints) 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_ulong_array(int[] value, int offset,
167                        int length);
168     /**
169      * Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
170      * @param value the array to be written.
171      * @param offset offset on the stream.
172      * @param length length of buffer to write.
173      */

174     public abstract void write_longlong_array(long[] value, int offset,
175                           int length);
176     /**
177      * Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
178      * @param value the array to be written.
179      * @param offset offset on the stream.
180      * @param length length of buffer to write.
181      */

182     public abstract void write_ulonglong_array(long[] value, int offset,
183                            int length);
184     /**
185      * Writes an array of floats on this output stream.
186      * @param value the array to be written.
187      * @param offset offset on the stream.
188      * @param length length of buffer to write.
189      */

190     public abstract void write_float_array(float[] value, int offset,
191                        int length);
192     /**
193      * Writes an array of doubles on this output stream.
194      * @param value the array to be written.
195      * @param offset offset on the stream.
196      * @param length length of buffer to write.
197      */

198     public abstract void write_double_array(double[] value, int offset,
199                         int length);
200     /**
201      * Writes a CORBA Object on this output stream.
202      * @param value the value to be written.
203      */

204     public abstract void write_Object(org.omg.CORBA.Object JavaDoc value);
205     /**
206      * Writes a TypeCode on this output stream.
207      * @param value the value to be written.
208      */

209     public abstract void write_TypeCode(TypeCode JavaDoc value);
210     /**
211      * Writes an Any on this output stream.
212      * @param value the value to be written.
213      */

214     public abstract void write_any(Any JavaDoc value);
215
216     /**
217      * Writes a Principle on this output stream.
218      * @param value the value to be written.
219      * @deprecated Deprecated by CORBA 2.2.
220      */

221     @Deprecated JavaDoc
222     public void write_Principal(Principal JavaDoc value) {
223         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
224     }
225
226     /**
227      * Writes an integer (length of arrays) onto this stream.
228      * @param b the value to be written.
229      * @throws java.io.IOException if there is an input/output error
230      * @see <a HREF="package-summary.html#unimpl"><code>portable</code>
231      * package comments for unimplemented features</a>
232      */

233     public void write(int b) throws java.io.IOException JavaDoc {
234         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
235     }
236
237     /**
238      * Writes a BigDecimal number.
239      * @param value a BidDecimal--value to be written.
240      */

241     public void write_fixed(java.math.BigDecimal JavaDoc value) {
242         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
243     }
244
245     /**
246      * Writes a CORBA context on this stream. The
247      * Context is marshaled as a sequence of strings.
248      * Only those Context values specified in the contexts
249      * parameter are actually written.
250      * @param ctx a CORBA context
251      * @param contexts a <code>ContextList</code> object containing the list of contexts
252      * to be written
253      * @see <a HREF="package-summary.html#unimpl"><code>portable</code>
254      * package comments for unimplemented features</a>
255      */

256     public void write_Context(org.omg.CORBA.Context JavaDoc ctx,
257                   org.omg.CORBA.ContextList JavaDoc contexts) {
258         throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
259     }
260
261     /**
262      * Returns the ORB that created this OutputStream.
263      * @return the ORB that created this OutputStream
264      * @see <a HREF="package-summary.html#unimpl"><code>portable</code>
265      * package comments for unimplemented features</a>
266      */

267     public org.omg.CORBA.ORB JavaDoc orb() {
268     throw new org.omg.CORBA.NO_IMPLEMENT JavaDoc();
269     }
270 }
271
Popular Tags