public class StringSerde extends java.lang.Object implements Serde<java.lang.String>
Constructor and Description |
---|
StringSerde() |
StringSerde(java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
fromBytes(byte[] bytes)
Deserializes given serialized object from an array of bytes to its original form.
|
byte[] |
toBytes(java.lang.String obj)
Serializes given object to an array of bytes.
|
public StringSerde(java.lang.String encoding)
public StringSerde()
public byte[] toBytes(java.lang.String obj)
Serializer
toBytes
in interface Serializer<java.lang.String>
obj
- Object of specific type to serialize.public java.lang.String fromBytes(byte[] bytes)
Deserializer
fromBytes
in interface Deserializer<java.lang.String>
bytes
- Array of bytes representing serialized object.