if (Debug.debugging("maketoc")) {
Debug.output("MakeToc: frame number " + i + ", " + framePath);
}
try {
BinaryFile binFile = new BinaryBufferedFile(framePath);
// Frame file names are 8.3 notation, might want to
// check
// that here, to blow off dummy files.
String fn = binFile.getName();
if (fn.length() != 12) {
// Not a RPF Frame file
if (Debug.debugging("maketoc")) {
Debug.error("MakeToc: " + framePath
+ " is not a RPF image file - ignoring");
}
continue;
}
RpfFileSections rfs = new RpfFileSections();
binFile.seek(0);
if (!head.read(binFile)) {
// Not a RPF Frame file
if (Debug.debugging("maketoc")) {
Debug.error("MakeToc: " + framePath
+ " is not a RPF image file - ignoring");
}
continue;
}
binFile.seek(head.locationSectionLocation);
rfs.parse(binFile);
coverage = rfs.parseCoverageSection(binFile);
if (coverage == null) {
Debug.error("MakeToc: error reading coverage section for "
+ framePath + ", (file " + i + ") skipping");
binFile.close();
continue;
}
if (Debug.debugging("maketocframedetail")) {
Debug.output("MakeToc.organizeFrames: coverage section for "
+ framePath + ", " + coverage);
}
binFile.close();
binFile = null;
} catch (FileNotFoundException e) {
Debug.error("MakeToc: " + framePath
+ " not found, being ignored.");