in.openFile(filePath);
if (!in.extractString(0, 3).equals("BSA") || in.extractInt(1, 4) != 104) {
throw new BadParameter("Was not a BSA file of version 104: " + filePath);
}
offset = in.extractInt(0, 4);
archiveFlags = new LFlags(in.extract(0, 4));
folderCount = in.extractInt(0, 4);
folders = new HashMap<>(folderCount);
fileCount = in.extractInt(0, 4);
folderNameLength = in.extractInt(0, 4);
fileNameLength = in.extractInt(0, 4);
fileFlags = new LFlags(in.extract(0, 4));
if (SPGlobal.debugBSAimport && SPGlobal.logging()) {
SPGlobal.logSpecial(LogTypes.BSA, header, "|==================>");
SPGlobal.logSpecial(LogTypes.BSA, header, "| Imported " + filePath);
SPGlobal.logSpecial(LogTypes.BSA, header, "| Offset " + offset + ", archiveFlags: " + archiveFlags);
SPGlobal.logSpecial(LogTypes.BSA, header, "| hasDirectoryNames: " + archiveFlags.get(0) + ", hasFileNames: " + archiveFlags.get(1) + ", compressed: " + archiveFlags.get(2));