} else {
throw new HandlerException("Unknown Path Table Type: " + type);
}
HashMap parentMapper = new HashMap();
ISO9660Directory dir = root;
int dirNumber = 1;
// Root Directory
ISO9660PathTableRecord rptr = new ISO9660PathTableRecord(streamHandler, type, ISO9660Constants.FI_ROOT, 1);
ptFixups.put(root, rptr.doPTR());
parentMapper.put(dir, new Integer(dirNumber));
// Subdirectories
Iterator it = root.sortedIterator();
while (it.hasNext()) {
dirNumber++;
dir = (ISO9660Directory) it.next();
// Retrieve parent directory number and reset filename clash detection if appropriate
int parent = ((Integer) parentMapper.get(dir.getParentDirectory())).intValue();
DataReference ref = helper.getFilenameDataReference(dir);
ISO9660PathTableRecord ptr = new ISO9660PathTableRecord(streamHandler, type, ref, parent);
ptFixups.put(dir, ptr.doPTR());
parentMapper.put(dir, new Integer(dirNumber));