public class StringSerializer extends Object implements Serializer<String>
Constructor and Description |
---|
StringSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Map<String,?> configs,
boolean isKey)
Configure this class.
|
byte[] |
serialize(String topic,
String data)
Convert
data into a byte array. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, serialize
public void configure(Map<String,?> configs, boolean isKey)
Serializer
configure
in interface Serializer<String>
configs
- configs in key/value pairsisKey
- whether is for key or valuepublic byte[] serialize(String topic, String data)
Serializer
data
into a byte array.serialize
in interface Serializer<String>
topic
- topic associated with datadata
- typed data