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 DataInputStream used for custom marshalling
025: * of value type.
026: *
027: * It simply delegates to InputStream all functions.
028: *
029: * @author Nick Cross
030: * @version $Id$
031: */
032: public class DataInputStream implements org.omg.CORBA.DataInputStream {
033: private final org.omg.CORBA.portable.InputStream delegate;
034:
035: public DataInputStream(org.omg.CORBA.portable.InputStream istream) {
036: delegate = istream;
037: }
038:
039: /**
040: * List of truncatable _ids
041: */
042: public String[] _truncatable_ids() {
043: return null;
044: }
045:
046: /**
047: * Operation read_any
048: */
049: public org.omg.CORBA.Any read_any() {
050: return delegate.read_any();
051: }
052:
053: /**
054: * Operation read_boolean
055: */
056: public boolean read_boolean() {
057: return delegate.read_boolean();
058: }
059:
060: /**
061: * Operation read_char
062: */
063: public char read_char() {
064: return delegate.read_char();
065: }
066:
067: /**
068: * Operation read_wchar
069: */
070: public char read_wchar() {
071: return delegate.read_wchar();
072: }
073:
074: /**
075: * Operation read_octet
076: */
077: public byte read_octet() {
078: return delegate.read_octet();
079: }
080:
081: /**
082: * Operation read_short
083: */
084: public short read_short() {
085: return delegate.read_short();
086: }
087:
088: /**
089: * Operation read_ushort
090: */
091: public short read_ushort() {
092: return delegate.read_ushort();
093: }
094:
095: /**
096: * Operation read_long
097: */
098: public int read_long() {
099: return delegate.read_long();
100: }
101:
102: /**
103: * Operation read_ulong
104: */
105: public int read_ulong() {
106: return delegate.read_ulong();
107: }
108:
109: /**
110: * Operation read_longlong
111: */
112: public long read_longlong() {
113: return delegate.read_longlong();
114: }
115:
116: /**
117: * Operation read_ulonglong
118: */
119: public long read_ulonglong() {
120: return delegate.read_ulonglong();
121: }
122:
123: /**
124: * Operation read_float
125: */
126: public float read_float() {
127: return delegate.read_float();
128: }
129:
130: /**
131: * Operation read_double
132: */
133: public double read_double() {
134: return delegate.read_double();
135: }
136:
137: /**
138: * Operation read_longdouble. This is not implemented.
139: */
140: public double read_longdouble() {
141: throw new org.omg.CORBA.NO_IMPLEMENT();
142: }
143:
144: /**
145: * Operation read_string
146: */
147: public java.lang.String read_string() {
148: return delegate.read_string();
149: }
150:
151: /**
152: * Operation read_wstring
153: */
154: public java.lang.String read_wstring() {
155: return delegate.read_wstring();
156: }
157:
158: /**
159: * Operation read_Object
160: */
161: public org.omg.CORBA.Object read_Object() {
162: return delegate.read_Object();
163: }
164:
165: /**
166: * Operation read_Abstract
167: */
168: public java.lang.Object read_Abstract() {
169: return ((org.omg.CORBA_2_3.portable.InputStream) delegate)
170: .read_abstract_interface();
171: }
172:
173: /**
174: * Operation read_value
175: */
176: public java.io.Serializable read_Value() {
177: return ((org.omg.CORBA_2_3.portable.InputStream) delegate)
178: .read_value();
179: }
180:
181: /**
182: * Operation read_TypeCode
183: */
184: public org.omg.CORBA.TypeCode read_TypeCode() {
185: return delegate.read_TypeCode();
186: }
187:
188: /**
189: * Operation read_any_array
190: */
191: public void read_any_array(org.omg.CORBA.AnySeqHolder seq,
192: int offset, int length) {
193: for (int i = offset; i < offset + length; i++) {
194: seq.value[i] = delegate.read_any();
195: }
196: }
197:
198: /**
199: * Operation read_boolean_array
200: */
201: public void read_boolean_array(org.omg.CORBA.BooleanSeqHolder seq,
202: int offset, int length) {
203: delegate.read_boolean_array(seq.value, offset, length);
204: }
205:
206: /**
207: * Operation read_char_array
208: */
209: public void read_char_array(org.omg.CORBA.CharSeqHolder seq,
210: int offset, int length) {
211: delegate.read_char_array(seq.value, offset, length);
212: }
213:
214: /**
215: * Operation read_wchar_array
216: */
217: public void read_wchar_array(org.omg.CORBA.WCharSeqHolder seq,
218: int offset, int length) {
219: delegate.read_wchar_array(seq.value, offset, length);
220: }
221:
222: /**
223: * Operation read_octet_array
224: */
225: public void read_octet_array(org.omg.CORBA.OctetSeqHolder seq,
226: int offset, int length) {
227: delegate.read_octet_array(seq.value, offset, length);
228: }
229:
230: /**
231: * Operation read_short_array
232: */
233: public void read_short_array(org.omg.CORBA.ShortSeqHolder seq,
234: int offset, int length) {
235: delegate.read_short_array(seq.value, offset, length);
236: }
237:
238: /**
239: * Operation read_ushort_array
240: */
241: public void read_ushort_array(org.omg.CORBA.UShortSeqHolder seq,
242: int offset, int length) {
243: delegate.read_ushort_array(seq.value, offset, length);
244: }
245:
246: /**
247: * Operation read_long_array
248: */
249: public void read_long_array(org.omg.CORBA.LongSeqHolder seq,
250: int offset, int length) {
251: delegate.read_long_array(seq.value, offset, length);
252: }
253:
254: /**
255: * Operation read_ulong_array
256: */
257: public void read_ulong_array(org.omg.CORBA.ULongSeqHolder seq,
258: int offset, int length) {
259: delegate.read_ulong_array(seq.value, offset, length);
260: }
261:
262: /**
263: * Operation read_longlong_array
264: */
265: public void read_longlong_array(
266: org.omg.CORBA.LongLongSeqHolder seq, int offset, int length) {
267: delegate.read_longlong_array(seq.value, offset, length);
268: }
269:
270: /**
271: * Operation read_ulonglong_array
272: */
273: public void read_ulonglong_array(
274: org.omg.CORBA.ULongLongSeqHolder seq, int offset, int length) {
275: delegate.read_ulonglong_array(seq.value, offset, length);
276: }
277:
278: /**
279: * Operation read_float_array
280: */
281: public void read_float_array(org.omg.CORBA.FloatSeqHolder seq,
282: int offset, int length) {
283: delegate.read_float_array(seq.value, offset, length);
284: }
285:
286: /**
287: * Operation read_double_array
288: */
289: public void read_double_array(org.omg.CORBA.DoubleSeqHolder seq,
290: int offset, int length) {
291: delegate.read_double_array(seq.value, offset, length);
292: }
293: }
|