public OffsetPosition entry(int n) {
        return maybeLock(lock, () -> {
            if (n >= entries())
                throw new IllegalArgumentException("Attempt to fetch the " + n + "th entry from index " +
                    file().getAbsolutePath() + ", which has size " + entries());
            return parseEntry(mmap(), n);
        });
    }
Get the nth offset mapping from the index
@param n The entry number in the index
@return The offset/position pair at that entry
storage/src/main/java/org/apache/kafka/storage/internals/log/OffsetIndex.java