protected void setupInventory() throws FileNotFoundException, AcsException, URISyntaxException, SAXException {
        ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(acsFile));

        try {
            ZipEntry zipEntry;
            while ((zipEntry = zipInputStream.getNextEntry()) != null) {

                if (zipEntry.isDirectory())
                    continue;

                String name = zipEntry.getName();
                if (name.startsWith(Constants.TOC_PREFIX) && name.endsWith(Constants.TOC_SUFFIX)) {
                    int tocVersion = parseTocVersion(name);
                    TableOfContents tableOfContents = createTableOfContents(zipInputStream, tocVersion);
                    tablesOfContentsByVersion.put(tocVersion, tableOfContents);

                    if (highestTableOfContentsVersion < tocVersion)
                        highestTableOfContentsVersion = tocVersion;
                }

                inventory.add(name);
            }
            zipInputStream.close();
        } catch (IOException ioe) {
            try {
                zipInputStream.close();
            } catch (IOException ignore) {
            }
            throw new InvalidArchiveException(ioe.toString());
        }
    }