105 |
|
|
106 |
/** |
/** |
107 |
* Reads the <code>String[]</code> from the CORBA input stream. |
* Reads the <code>String[]</code> from the CORBA input stream. |
|
* This implementation first creates an instance of |
|
|
* {@link StringSeqHolder} and then delegates functionality |
|
|
* to its <code>_read()</code> method. |
|
108 |
* |
* |
109 |
* @param input the CORBA (not java.io) stream to read from. |
* @param input the CORBA (not java.io) stream to read from. |
110 |
* @return the value from the stream. |
* @return the value from the stream. |
111 |
*/ |
*/ |
112 |
public static String[] read(InputStream input) |
public static String[] read(InputStream input) |
113 |
{ |
{ |
114 |
StringSeqHolder h = new StringSeqHolder(); |
String[] value = new String[ input.read_long() ]; |
115 |
h._read(input); |
for (int i = 0; i < value.length; i++) |
116 |
return h.value; |
value [ i ] = input.read_string(); |
117 |
|
return value; |
118 |
} |
} |
119 |
|
|
120 |
/** |
/** |
130 |
|
|
131 |
/** |
/** |
132 |
* Writes the <code>String[]</code> into the given stream. |
* Writes the <code>String[]</code> into the given stream. |
|
* This implementation first creates an instance of |
|
|
* {@link StringSeqHolder} and then delegates functionality |
|
|
* to its <code>_write()</code> method. |
|
133 |
* |
* |
134 |
* @param output the CORBA (not java.io) output stream to write. |
* @param output the CORBA (not java.io) output stream to write. |
135 |
* @param value the value that must be written. |
* @param value the value that must be written. |
136 |
*/ |
*/ |
137 |
public static void write(OutputStream output, String[] value) |
public static void write(OutputStream output, String[] value) |
138 |
{ |
{ |
139 |
StringSeqHolder h = new StringSeqHolder(value); |
output.write_long(value.length); |
140 |
h._write(output); |
|
141 |
|
for (int i = 0; i < value.length; i++) |
142 |
|
output.write_string(value [ i ]); |
143 |
} |
} |
144 |
} |
} |