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;
}