@Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        MemoryRecords that = (MemoryRecords) o;

        return buffer.equals(that.buffer);
    }
Get the byte buffer that backs this instance for reading.
clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java