private long getAbsoluteReadBytesFromIndexBasedToken(StoreFindToken indexBasedToken,
      ConcurrentSkipListMap<Offset, IndexSegment> indexSegments) throws StoreException {
    Offset offset = indexBasedToken.getOffset();
    LogSegment logSegment = log.getSegment(offset.getName());
    if (logSegment == null || offset.getOffset() > logSegment.getEndOffset()) {
      throw new IllegalArgumentException("Offset is invalid: " + offset + "; LogSegment: " + logSegment);
    }
    int numPrecedingLogSegments = getLogSegmentToIndexSegmentMapping(indexSegments).headMap(offset.getName()).size();
    return numPrecedingLogSegments * log.getSegmentCapacity() + logSegment.getEndOffset()
        - getTotalOffsetAfterTokenPointedStoreKey(indexBasedToken);
  }
Get the absolute read bytes from index based token {@link StoreKey}.
@param indexBasedToken the point until which the log has been read.
@param indexSegments the list of index segments to use.
@return the absolute read bytes represented by token.
@throws StoreException
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java