{
List strongRef = new ArrayList(100);
TarEntry entry;
while ((entry = getTarFile().getNextEntry()) != null)
{
FileName name = getFileSystemManager().resolveName(getRootName(), UriParser.encode(entry.getName()));
// Create the file
TarFileObject fileObj;
if (entry.isDirectory() && getFileFromCache(name) != null)
{
fileObj = (TarFileObject) getFileFromCache(name);
fileObj.setTarEntry(entry);
continue;
}
fileObj = createTarFileObject(name, entry);
putFileToCache(fileObj);
strongRef.add(fileObj);
fileObj.holdObject(strongRef);
// Make sure all ancestors exist
// TODO - create these on demand
TarFileObject parent = null;
for (FileName parentName = name.getParent();
parentName != null;
fileObj = parent, parentName = parentName.getParent())
{
// Locate the parent
parent = (TarFileObject) getFileFromCache(parentName);