private void initialize() throws IOException {
ZipEntry entry = in.getNextEntry();
if (NuxeoArchiveReader.isMarkerEntry(entry)) {
delegate = new NuxeoArchiveReader(in, false);
} else {
File root = null;
try {
root = Framework.createTempFile("nuxeo-import-", ".unzip");
Framework.trackFile(root, root);
root.delete();
root.mkdirs();
extract(in, entry, root);
while ((entry = in.getNextEntry()) != null) {
extract(in, entry, root);
}
} finally {
in.close();
}
delegate = new XMLDirectoryReader(root);
}
}