public void readInto(ByteBuffer buffer, int position) throws IOException {
        Utils.readFully(channel, buffer, position + this.start);
        buffer.flip();
    }
Read log batches into the given buffer until there are no bytes remaining in the buffer or the end of the file
is reached.

@param buffer The buffer to write the batches to
@param position Position in the buffer to read from
@throws IOException If an I/O error occurs, see {@link FileChannel#read(ByteBuffer, long)} for details on the
possible exceptions
clients/src/main/java/org/apache/kafka/common/record/FileRecords.java