public synchronized org.omg.CORBA.Any to_any(DynValueWriter dynValueWriter) {
if (destroyed_)
throw new org.omg.CORBA.OBJECT_NOT_EXIST();
if (is_null())
return new Any(orbInstance_, type_, null);
else {
org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer();
OutputStream out = new OutputStream(buf);
out._OB_ORBInstance(orbInstance_);
if (dynValueWriter != null)
_OB_marshal(out, dynValueWriter);
else
_OB_marshal(out);
InputStream in = (InputStream) out.create_input_stream();
return new Any(orbInstance_, type_, in);
}
}