38 |
|
|
39 |
package org.omg.IOP; |
package org.omg.IOP; |
40 |
|
|
41 |
import gnu.CORBA.CDR.cdrBufInput; |
import gnu.CORBA.Minor; |
42 |
import gnu.CORBA.CDR.cdrBufOutput; |
import gnu.CORBA.CDR.BufferredCdrInput; |
43 |
|
import gnu.CORBA.CDR.BufferedCdrOutput; |
44 |
|
|
45 |
import org.omg.CORBA.Any; |
import org.omg.CORBA.Any; |
46 |
import org.omg.CORBA.BAD_OPERATION; |
import org.omg.CORBA.BAD_OPERATION; |
119 |
catch (ClassCastException cex) |
catch (ClassCastException cex) |
120 |
{ |
{ |
121 |
BAD_OPERATION bad = new BAD_OPERATION("TaggedProfile expected"); |
BAD_OPERATION bad = new BAD_OPERATION("TaggedProfile expected"); |
122 |
|
bad.minor = Minor.Any; |
123 |
bad.initCause(cex); |
bad.initCause(cex); |
124 |
throw bad; |
throw bad; |
125 |
} |
} |
145 |
TaggedProfile value = new TaggedProfile(); |
TaggedProfile value = new TaggedProfile(); |
146 |
value.tag = input.read_long(); |
value.tag = input.read_long(); |
147 |
|
|
148 |
if (input instanceof cdrBufInput) |
if (input instanceof BufferredCdrInput) |
149 |
{ |
{ |
150 |
// Highly probable. |
// Highly probable. |
151 |
value.profile_data = ((cdrBufInput) input).read_sequence(); |
value.profile_data = ((BufferredCdrInput) input).read_sequence(); |
152 |
} |
} |
153 |
else |
else |
154 |
{ |
{ |
169 |
{ |
{ |
170 |
output.write_long(value.tag); |
output.write_long(value.tag); |
171 |
|
|
172 |
if (output instanceof cdrBufOutput) |
if (output instanceof BufferedCdrOutput) |
173 |
{ |
{ |
174 |
// Highly probable. |
// Highly probable. |
175 |
output.write_long(value.profile_data.length); |
output.write_long(value.profile_data.length); |
180 |
catch (IOException e) |
catch (IOException e) |
181 |
{ |
{ |
182 |
MARSHAL m = new MARSHAL(); |
MARSHAL m = new MARSHAL(); |
183 |
|
m.minor = Minor.Encapsulation; |
184 |
m.initCause(e); |
m.initCause(e); |
185 |
throw m; |
throw m; |
186 |
} |
} |