38 |
|
|
39 |
package gnu.CORBA.GIOP; |
package gnu.CORBA.GIOP; |
40 |
|
|
41 |
import gnu.CORBA.CDR.cdrInput; |
import gnu.CORBA.CDR.AbstractCdrInput; |
42 |
import gnu.CORBA.CDR.cdrOutput; |
import gnu.CORBA.CDR.AbstractCdrOutput; |
43 |
|
|
44 |
import org.omg.CORBA.BAD_INV_ORDER; |
import org.omg.CORBA.BAD_INV_ORDER; |
45 |
import org.omg.CORBA.BAD_PARAM; |
import org.omg.CORBA.BAD_PARAM; |
137 |
* |
* |
138 |
* @param istream a stream to read from. |
* @param istream a stream to read from. |
139 |
*/ |
*/ |
140 |
public static ServiceContext read(cdrInput istream) |
public static ServiceContext read(AbstractCdrInput istream) |
141 |
{ |
{ |
142 |
int id = istream.read_ulong(); |
int id = istream.read_ulong(); |
143 |
|
|
161 |
/** |
/** |
162 |
* Read a sequence of contexts from the input stream. |
* Read a sequence of contexts from the input stream. |
163 |
*/ |
*/ |
164 |
public static ServiceContext[] readSequence(cdrInput istream) |
public static ServiceContext[] readSequence(AbstractCdrInput istream) |
165 |
{ |
{ |
166 |
int size = istream.read_long(); |
int size = istream.read_long(); |
167 |
ServiceContext[] value = new gnu.CORBA.GIOP.ServiceContext[size]; |
ServiceContext[] value = new gnu.CORBA.GIOP.ServiceContext[size]; |
175 |
* |
* |
176 |
* @param ostream a stream to write the data to. |
* @param ostream a stream to write the data to. |
177 |
*/ |
*/ |
178 |
public void write(cdrOutput ostream) |
public void write(AbstractCdrOutput ostream) |
179 |
{ |
{ |
180 |
ostream.write_ulong(context_id); |
ostream.write_ulong(context_id); |
181 |
ostream.write_sequence(context_data); |
ostream.write_sequence(context_data); |
184 |
/** |
/** |
185 |
* Write the sequence of contexts into the input stream. |
* Write the sequence of contexts into the input stream. |
186 |
*/ |
*/ |
187 |
public static void writeSequence(cdrOutput ostream, ServiceContext[] value) |
public static void writeSequence(AbstractCdrOutput ostream, ServiceContext[] value) |
188 |
{ |
{ |
189 |
ostream.write_long(value.length); |
ostream.write_long(value.length); |
190 |
for (int i = 0; i < value.length; i++) |
for (int i = 0; i < value.length; i++) |