File rootDir = new File(workDir, "big");
assertThat(rootDir.isDirectory() || rootDir.mkdirs(), is(true));
// Directory hierarchy, starting from the root
ISO9660RootDirectory.MOVED_DIRECTORIES_STORE_NAME = "rr_moved";
ISO9660RootDirectory root = new ISO9660RootDirectory();
for (int i = 0; i < numFiles; i++) {
File content = new File(rootDir, Integer.toString(i) + ".bin");
int length = entropy.nextInt(1024 * 10 + 1);
byte[] contents = new byte[length];
entropy.nextBytes(contents);
FileOutputStream fos = null;
try {
fos = new FileOutputStream(content);
fos.write(contents);
} finally {
IOUtil.close(fos);
}
root.addFile(content);
}
StreamHandler streamHandler = new ISOImageFileHandler(outfile);
CreateISO iso = new CreateISO(streamHandler, root);
ISO9660Config iso9660Config = new ISO9660Config();