001: package org.jacorb.orb;
002:
003: /*
004: * JacORB - a free Java ORB
005: *
006: * Copyright (C) 1997-2004 Gerald Brose.
007: *
008: * This library is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU Library General Public
010: * License as published by the Free Software Foundation; either
011: * version 2 of the License, or (at your option) any later version.
012: *
013: * This library is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016: * Library General Public License for more details.
017: *
018: * You should have received a copy of the GNU Library General Public
019: * License along with this library; if not, write to the Free
020: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021: */
022:
023: /**
024: * This class is the implementation of DataOutputStream used for
025: * custom marshalling of value type.
026: *
027: * It simply delegates to OutputStream all functions.
028: *
029: * @author Nick Cross
030: * @version $Id$
031: */
032: public class DataOutputStream implements org.omg.CORBA.DataOutputStream {
033: /**
034: * Reference to the InputStream
035: */
036: private final org.omg.CORBA.portable.OutputStream delegate;
037:
038: /**
039: * Constructor
040: */
041: public DataOutputStream(org.omg.CORBA.portable.OutputStream ostream) {
042: delegate = ostream;
043: }
044:
045: /**
046: * List of truncatable _ids
047: */
048: public String[] _truncatable_ids() {
049: return null;
050: }
051:
052: /**
053: * Operation write_any
054: */
055: public void write_any(org.omg.CORBA.Any value) {
056: delegate.write_any(value);
057: }
058:
059: /**
060: * Operation write_boolean
061: */
062: public void write_boolean(boolean value) {
063: delegate.write_boolean(value);
064: }
065:
066: /**
067: * Operation write_char
068: */
069: public void write_char(char value) {
070: delegate.write_char(value);
071: }
072:
073: /**
074: * Operation write_wchar
075: */
076: public void write_wchar(char value) {
077: delegate.write_wchar(value);
078: }
079:
080: /**
081: * Operation write_octet
082: */
083: public void write_octet(byte value) {
084: delegate.write_octet(value);
085: }
086:
087: /**
088: * Operation write_short
089: */
090: public void write_short(short value) {
091: delegate.write_short(value);
092: }
093:
094: /**
095: * Operation write_ushort
096: */
097: public void write_ushort(short value) {
098: delegate.write_ushort(value);
099: }
100:
101: /**
102: * Operation write_long
103: */
104: public void write_long(int value) {
105: delegate.write_long(value);
106: }
107:
108: /**
109: * Operation write_ulong
110: */
111: public void write_ulong(int value) {
112: delegate.write_ulong(value);
113: }
114:
115: /**
116: * Operation write_longlong
117: */
118: public void write_longlong(long value) {
119: delegate.write_longlong(value);
120: }
121:
122: /**
123: * Operation write_ulonglong
124: */
125: public void write_ulonglong(long value) {
126: delegate.write_ulonglong(value);
127: }
128:
129: /**
130: * Operation write_float
131: */
132: public void write_float(float value) {
133: delegate.write_float(value);
134: }
135:
136: /**
137: * Operation write_double
138: */
139: public void write_double(double value) {
140: delegate.write_double(value);
141: }
142:
143: /**
144: * Operation write_longdouble. This is not implemented.
145: */
146: public void write_longdouble(double value) {
147: throw new org.omg.CORBA.NO_IMPLEMENT();
148: }
149:
150: /**
151: * Operation write_string
152: */
153: public void write_string(java.lang.String value) {
154: delegate.write_string(value);
155: }
156:
157: /**
158: * Operation write_wstring
159: */
160: public void write_wstring(java.lang.String value) {
161: delegate.write_wstring(value);
162: }
163:
164: /**
165: * Operation write_Object
166: */
167: public void write_Object(org.omg.CORBA.Object value) {
168: delegate.write_Object(value);
169: }
170:
171: /**
172: * Operation write_Abstract
173: */
174: public void write_Abstract(java.lang.Object value) {
175: ((org.omg.CORBA_2_3.portable.OutputStream) delegate)
176: .write_abstract_interface(value);
177: }
178:
179: /**
180: * Operation write_value
181: */
182: public void write_Value(java.io.Serializable value) {
183: ((org.omg.CORBA_2_3.portable.OutputStream) delegate)
184: .write_value(value);
185: }
186:
187: /**
188: * Operation write_TypeCode
189: */
190: public void write_TypeCode(org.omg.CORBA.TypeCode value) {
191: delegate.write_TypeCode(value);
192: }
193:
194: /**
195: * Operation write_any_array
196: */
197: public void write_any_array(org.omg.CORBA.Any[] seq, int offset,
198: int length) {
199: for (int i = offset; i < offset + length; i++) {
200: delegate.write_any(seq[i]);
201: }
202: }
203:
204: /**
205: * Operation write_boolean_array
206: */
207: public void write_boolean_array(boolean[] seq, int offset,
208: int length) {
209: delegate.write_boolean_array(seq, offset, length);
210: }
211:
212: /**
213: * Operation write_char_array
214: */
215: public void write_char_array(char[] seq, int offset, int length) {
216: delegate.write_char_array(seq, offset, length);
217: }
218:
219: /**
220: * Operation write_wchar_array
221: */
222: public void write_wchar_array(char[] seq, int offset, int length) {
223: delegate.write_wchar_array(seq, offset, length);
224: }
225:
226: /**
227: * Operation write_octet_array
228: */
229: public void write_octet_array(byte[] seq, int offset, int length) {
230: delegate.write_octet_array(seq, offset, length);
231: }
232:
233: /**
234: * Operation write_short_array
235: */
236: public void write_short_array(short[] seq, int offset, int length) {
237: delegate.write_short_array(seq, offset, length);
238: }
239:
240: /**
241: * Operation write_ushort_array
242: */
243: public void write_ushort_array(short[] seq, int offset, int length) {
244: delegate.write_ushort_array(seq, offset, length);
245: }
246:
247: /**
248: * Operation write_long_array
249: */
250: public void write_long_array(int[] seq, int offset, int length) {
251: delegate.write_long_array(seq, offset, length);
252: }
253:
254: /**
255: * Operation write_ulong_array
256: */
257: public void write_ulong_array(int[] seq, int offset, int length) {
258: delegate.write_ulong_array(seq, offset, length);
259: }
260:
261: /**
262: * Operation write_longlong_array
263: */
264: public void write_longlong_array(long[] seq, int offset, int length) {
265: delegate.write_longlong_array(seq, offset, length);
266: }
267:
268: /**
269: * Operation write_ulonglong_array
270: */
271: public void write_ulonglong_array(long[] seq, int offset, int length) {
272: delegate.write_ulonglong_array(seq, offset, length);
273: }
274:
275: /**
276: * Operation write_float_array
277: */
278: public void write_float_array(float[] seq, int offset, int length) {
279: delegate.write_float_array(seq, offset, length);
280: }
281:
282: /**
283: * Operation write_double_array
284: */
285: public void write_double_array(double[] seq, int offset, int length) {
286: delegate.write_double_array(seq, offset, length);
287: }
288: }
|