public static ZipFileIndex getZipFileIndex(File zipFile,
            RelativeDirectory symbolFilePrefix,
            boolean useCache, String cacheLocation,
            boolean writeIndex) throws IOException {
        ZipFileIndex zi = null;
        lock.lock();
        try {
            zi = getExistingZipIndex(zipFile);

            if (zi == null || (zi != null && zipFile.lastModified() != zi.zipFileLastModified)) {
                zi = new ZipFileIndex(zipFile, symbolFilePrefix, writeIndex,
                        useCache, cacheLocation);
                zipFileIndexCache.put(zipFile, zi);
            }
        }
        finally {
            lock.unlock();
        }
        return zi;
    }