boolean foundExpectedFile = false;
InputStream in = null;
try {
// open the file in question
in = new BufferedInputStream(new FileInputStream(f));
if (isPdbk(f)) in = new XorInputStream(in, PDBK_XOR_BITS);
// we use a ZipInputStream and scan the entire file, to ensure
// that the file is intact and not corrupt near the end.
ZipInputStream zipIn = new ZipInputStream(in);
ZipEntry e;
while ((e = zipIn.getNextEntry()) != null)