StringConverter¶
-
public class
StringConverter
implements Converter<ByteBuffer>¶ A converter with wire type
ByteBuffer
that is capable of handling strings with different encodings.- Author
swrede, jwienke
Constructors¶
StringConverter¶
-
public
StringConverter
()¶ Creates a converter for UTF-8 encoding with utf-8-string wire schema.
StringConverter¶
-
public
StringConverter
(String encoding, String wireSchema)¶ Creates a converter that uses the specified encoding for strings.
- Parameters
encoding – encoding name for the data
wireSchema – wire schema of the serialized data
- Throws
IllegalArgumentException – invalid encoding name
Methods¶
deserialize¶
-
public UserData<ByteBuffer>
deserialize
(String wireSchema, ByteBuffer bytes)¶
getSignature¶
-
public ConverterSignature
getSignature
()¶
serialize¶
-
public WireContents<ByteBuffer>
serialize
(Class<?> typeInfo, Object data)¶