private Object[] readParameters(ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        int n = in.readInt();
        Object[] args = new Object[n];
        for (int i = 0; i < n; ++i) {
            Object a = in.readObject();
            if (a instanceof RemoteRef) {
                RemoteRef ref = (RemoteRef)a;
                ExportedObject eo
                    = (ExportedObject)exportedObjects.elementAt(ref.oid);
                a = eo.object;
            }

            args[i] = a;
        }

        return args;
    }