private StoreKey getKeyAt(ByteBuffer mmap, int index) throws StoreException {
      StoreKey storeKey = null;
      try {
        mmap.position(firstKeyRelativeOffset + index * persistedEntrySize);
        storeKey = factory.getStoreKey(new DataInputStream(new ByteBufferInputStream(mmap)));
      } catch (InternalError e) {
        StoreErrorCodes errorCode = StoreException.resolveErrorCode(e);
        throw new StoreException("Internal " + errorCode.toString() + " while trying to get store key", e, errorCode);
      } catch (IOException e) {
        StoreErrorCodes errorCode = StoreException.resolveErrorCode(e);
        throw new StoreException(errorCode.toString() + " while trying to get store key", e, errorCode);
      } catch (Throwable t) {
        throw new StoreException("Unknown error while trying to get store key ", t, StoreErrorCodes.UnknownError);
      }
      return storeKey;
    }
Gets values for all matches for {@code keyToFind} at and in the vicinity of {@code positiveMatchInd}.
@param mmap the serEntries to read values off of
@param keyToFind the needle {@link StoreKey}
@param positiveMatchInd the index of a confirmed positive match
@param totalEntries the total number of entries in the index
@param values the set to which the {@link IndexValue}s will be added
@return a pair consisting of the lowest index that matched the key and the highest
@throws StoreException if there are problems reading from the mmap
ambry-store/src/main/java/com/github/ambry/store/IndexSegment.java