@Override
    public SchemaAndValue toConnectData(String topic, byte[] value) {
        throw new DataException("Headers are required for this converter!");
    }
This is a simple Converter implementation that uses "encoding" header to encode/decode strings via provided charset name
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/SampleConverterWithHeaders.java