package x;

import org.omg.CORBA.Any;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.OutputStream;

import com.sun.corba.se.impl.corba.AnyImpl;
import com.sun.corba.se.spi.orb.ORB;

public class MyAny extends AnyImpl {

    private static final long serialVersionUID = -7812851408187113076L;

    public MyAny(ORB orb, Any obj) {
        super(orb, obj);
        // TODO Auto-generated constructor stub
    }

    public MyAny(ORB orb) {
        super(orb);
        // TODO Auto-generated constructor stub
    }

    static MyAny ref;

    @Override
    public OutputStream create_output_stream() {
        // This hack is needed, to make TCUtilitiy use streamable._read()
        // which calles read_value instead of read_Object on the stream
        ref = this;
        return new MyOutputStream();
    }

    @Override
    public TypeCode type() {
        return super.type();

    }

}
