for (Enumeration elements = source.entries();
elements.hasMoreElements();) {
String elementName = (String) elements.nextElement();
InputStream is = source.getEntry(elementName);
OutputStream fos = null;
try {
if (elementName.indexOf('/") != -1) {
String directory = elementName.substring(0,
elementName.lastIndexOf('/"));
File dir = new File(dest, directory);
if (!dir.exists()) {
dir.mkdirs();
}
}
File elementFile = new File(dest, elementName);
fos = new BufferedOutputStream(
new FileOutputStream(elementFile));
ArchivistUtils.copy(is, fos);
} finally {
try {
if(is != null)
is.close();
if(fos != null)
fos.close();
} catch (Exception e) {}
}
}