public byte[] getByteArray(String name) {
        Object result = get(name);
        if (result instanceof byte[])
            return (byte[]) result;
        ByteBuffer buf = (ByteBuffer) result;
        byte[] arr = new byte[buf.remaining()];
        buf.get(arr);
        buf.flip();
        return arr;
    }
Check if the struct contains a field.
@param name
@return Whether a field exists.
clients/src/main/java/org/apache/kafka/common/protocol/types/Struct.java