api = (BlockDeviceAPI) device.getAPI(BlockDeviceAPI.class);
api = device.getAPI(BlockDeviceAPI.class);
    public AbstractFileSystem(Device device, boolean readOnly)            throws FileSystemException {        if (device == null) throw new IllegalArgumentException("null device!");        this.device = device;        try {            api = (BlockDeviceAPI) device.getAPI(BlockDeviceAPI.class);        } catch (ApiNotFoundException e) {            throw new FileSystemException("Device is not a partition!", e);        }                        this.closed = false;        this.readOnly = readOnly;    }