code: private boolean isMoreToReadBeforeReadingRecord(
        final SequenceOffsetType recordSequenceNumber,
        final SequenceOffsetType endSequenceNumber
    )
    {
      final int compareToEnd = createSequenceNumber(recordSequenceNumber)
          .compareTo(createSequenceNumber(endSequenceNumber));
  
      return isEndOffsetExclusive() ? compareToEnd < 0 : compareToEnd <= 0;
    }
docs: Returns true if, given that we want to start reading from recordSequenceNumber and end at endSequenceNumber, there
  is more left to read. Used in pre-read checks to determine if there is anything left to read.