public static void write(DataOutputStream out,
                             byte magic,
                             long crc,
                             byte attributes,
                             long timestamp,
                             byte[] key,
                             byte[] value) throws IOException {
        write(out, magic, crc, attributes, timestamp, wrapNullable(key), wrapNullable(value));
    }
Write a record using raw fields (without validation). This should only be used in testing.
clients/src/main/java/org/apache/kafka/common/record/LegacyRecord.java