List strongRef = new ArrayList(100);
Enumeration entries = getZipFile().entries();
while (entries.hasMoreElements())
{
ZipEntry entry = (ZipEntry) entries.nextElement();
FileName name = getFileSystemManager().resolveName(getRootName(), UriParser.encode(entry.getName()));
// Create the file
ZipFileObject fileObj;
if (entry.isDirectory() && getFileFromCache(name) != null)
{
fileObj = (ZipFileObject) getFileFromCache(name);
fileObj.setZipEntry(entry);
continue;
}
fileObj = createZipFileObject(name, entry);
putFileToCache(fileObj);
strongRef.add(fileObj);
fileObj.holdObject(strongRef);
// Make sure all ancestors exist
// TODO - create these on demand
ZipFileObject parent = null;
for (FileName parentName = name.getParent();
parentName != null;
fileObj = parent, parentName = parentName.getParent())
{
// Locate the parent
parent = (ZipFileObject) getFileFromCache(parentName);