@Override
    public int writeTo(TransferableChannel destChannel, int previouslyWritten, int remaining) throws IOException {
        long position = this.position + previouslyWritten;
        int count = Math.min(remaining, sizeInBytes() - previouslyWritten);
        // safe to cast to int since `count` is an int
        return (int) destChannel.transferFrom(channel, position, count);
    }
Represents a file record set which is not necessarily offset-aligned
clients/src/main/java/org/apache/kafka/common/record/UnalignedFileRecords.java