code: private LogRecordWithInputStream nextLogRecord() throws IOException {
      try {
        return nextLogRecord(reader);
      } catch (EndOfStreamException e) {
        eos = true;
        LOG.info(()->"end of stream is reached");
        return null;
      }
    }
docs: Get input stream representing next entry in the
  ledger.
  
  @return input stream, or null if no more entries