org.omg.CORBA
Class Any

Serves as a container for any data that can be
described in IDL or for any IDL primitive type.
An Any object is used as a component of a
NamedValue object, which provides information about
arguments or return values in requests, and which is used to define
name/value pairs in Context objects.

An Any object consists of two parts:

a data value

a TypeCode object describing the type of the data
value contained in the Any object. For example,
a TypeCode object for an array contains
a field for the length of the array and a field for
the type of elements in the array. (Note that in this case, the
second field of the TypeCode object is itself a
TypeCode object.)

type

Sets this Any object's type field
to the given TypeCode object and clears its value.

Note that using this method to set the type code wipes out the
value if there is one. The method
is provided primarily so that the type may be set properly for
IDL out parameters. Generally, setting the type
is done by the insert_X methods, which will set the type
to X if it is not already set to X.

Parameters:

t - the TypeCode object giving
information for the value in
this Any object

write_value

Writes out the value of this Any object
to the given output stream. If both typecode
and value need to be written, use
create_output_stream() to create an OutputStream,
then use write_any on the OutputStream.

If this method is called on an Any object that has not
had a value inserted into its value field, it will throw
the exception java.lang.NullPointerException.

Parameters:

os - the org.omg.CORBA.portable.OutputStream
object into which to marshal the value
of this Any object