throw new IOException("BlockDeviceAPI not found on device", ex);
final IOException ioe = new IOException("BlockDeviceAPI not found on device"); ioe.initCause(ex); throw ioe;
    public void createImage() throws IOException, DriverException,            FileSystemException {        final FileDevice newFd = new FileDevice(destFile, "rw");        try {            newFd.setLength(getDeviceLength());            formatDevice(newFd);            final Device sysDev = getSystemDevice(newFd);            final BlockDeviceAPI sysDevApi = (BlockDeviceAPI) sysDev                    .getAPI(BlockDeviceAPI.class);            copySystemFiles(sysDev);            sysDevApi.flush();        } catch (ApiNotFoundException ex) {            throw new IOException("BlockDeviceAPI not found on device", ex);        } finally {            newFd.close();        }    }