getDefaultHabitat().getComponent(ArchivistFactory.class);
// in all cases we copy the stubs file in the target archive
Set elements = new HashSet();
for (int i=0; i<stubs.length;i++) {
ZipItem item = stubs[i];
if (elements.contains(item.getName())) {
continue;
}
elements.add(item.getName());
OutputStream os = null;
InputStream is = null;
try {
os = target.putNextEntry(item.getName());
is = new BufferedInputStream(new FileInputStream(item.getFile()));
ArchivistUtils.copyWithoutClose(is, os);
} finally {
if (is != null) {
is.close();
}