114 |
*/ |
*/ |
115 |
public static Any[] read(InputStream input) |
public static Any[] read(InputStream input) |
116 |
{ |
{ |
117 |
AnySeqHolder h = new AnySeqHolder(); |
Any[] value = new Any[ input.read_long() ]; |
118 |
h._read(input); |
for (int i = 0; i < value.length; i++) |
119 |
return h.value; |
{ |
120 |
|
value [ i ] = input.read_any(); |
121 |
|
} |
122 |
|
return value; |
123 |
} |
} |
124 |
|
|
125 |
/** |
/** |
135 |
|
|
136 |
/** |
/** |
137 |
* Writes the array of {@link Any}'s into the given stream. |
* Writes the array of {@link Any}'s into the given stream. |
|
* This implementation first creates an instance of |
|
|
* {@link AnySeqHolder} and then delegates functionality |
|
|
* to its <code>_write()</code> method. |
|
138 |
* |
* |
139 |
* @param output the CORBA (not java.io) output stream to write. |
* @param output the CORBA (not java.io) output stream to write. |
140 |
* @param value the value that must be written. |
* @param value the value that must be written. |
141 |
*/ |
*/ |
142 |
public static void write(OutputStream output, Any[] value) |
public static void write(OutputStream output, Any[] value) |
143 |
{ |
{ |
144 |
AnySeqHolder h = new AnySeqHolder(value); |
output.write_long(value.length); |
145 |
h._write(output); |
|
146 |
|
for (int i = 0; i < value.length; i++) |
147 |
|
{ |
148 |
|
output.write_any(value [ i ]); |
149 |
|
} |
150 |
} |
} |
151 |
} |
} |