void close ()
    throws USBException
    {
	if (fd < 0)
	    return;

	try {
	    // make sure this isn't usable any more
	    int status = closeNative (fd);
	    if (status < 0)
		throw new USBException (
			"error closing device",
			-status);
	} finally {
	    // make sure nobody else sees the device
	    usb.removeDev (this);
	    hub = null;
	    fd = -1;
	}
    }