void doDir(ISO9660Directory dir, HashMap parentMapper) throws HandlerException { Integer location = new Integer(helper.getCurrentLocation()); if (originalParentMapper.containsKey(dir)) { // Remember directory location for PL Location Fixup parentLocations.put(originalParentMapper.get(dir), location); } else if (dir.isMoved()) { // Remember directory location for CL Location Fixup childLocations.put(dir, location); } super.doDir(dir, parentMapper); }
private void doCA() throws HandlerException { long position = streamHandler.mark(); streamHandler.startElement(new LogicalSectorElement("CA")); int location = helper.getCurrentLocation(); // Write and close RRIP ER Location Fixup Fixup rripERLocationFixup = (Fixup) volumeFixups.get("rripERLocationFixup"); rripERLocationFixup.data(new BothWordDataReference(location)); rripERLocationFixup.close(); // Write ER Entry rripFactory.doEREntry(); // Write ST Entry and compute length int erLength = doST(helper.getDifferenceTo(position)); // Write and close RRIP ER Length Fixup Fixup rripERLengthFixup = (Fixup) volumeFixups.get("rripERLengthFixup"); rripERLengthFixup.data(new BothWordDataReference(erLength)); rripERLengthFixup.close(); // Process unfinished NM Entries int offset = erLength; Iterator it = unfinishedNMEntries.iterator(); while (it.hasNext()) { UnfinishedNMEntry unfinishedNMEntry = (UnfinishedNMEntry) it.next(); String name = unfinishedNMEntry.filenameRest; rripFactory.doNMEntry(0, helper.getFilenameDataReference(name)); // Write and close CE Entry Location Fixup unfinishedNMEntry.location.data(new BothWordDataReference(location)); unfinishedNMEntry.location.close(); // Write and close CE Entry Offset Fixup unfinishedNMEntry.offset.data(new BothWordDataReference(offset)); unfinishedNMEntry.offset.close(); // Write ST Entry and compute length int ceLength = doST(name.length() + RRIPFactory.NM_ENTRY_LENGTH); // Write and close CE Entry Length Fixup unfinishedNMEntry.length.data(new BothWordDataReference(ceLength)); unfinishedNMEntry.length.close(); offset += ceLength; } streamHandler.endElement(); }