public class StringSerializer extends Object implements Serializer<String>
| Constructor and Description |
|---|
StringSerializer() |
| Modifier and Type | Method and Description |
|---|---|
String |
clone(String origin)
Creates a new value instance and copies the values from
origin to the new instance. |
String |
from(byte[] data)
Deserializes a target value into a source value ("input from external").
|
Class<String> |
getType()
The type to be handled by this serializer.
|
byte[] |
to(String source)
Translates a source value into a target value ("output to external").
|
public String from(byte[] data) throws IOException
InputTypeTranslatorfrom in interface InputTypeTranslator<byte[],String>data - the data to be translated backIOException - in case that serialization failspublic byte[] to(String source) throws IOException
OutputTypeTranslatorto in interface OutputTypeTranslator<String,byte[]>source - the source value to be translatedIOException - in case that translation failspublic String clone(String origin) throws IOException
Serializerorigin to the new instance.
Use the SerializerRegistry to implement cloning of nested object values.clone in interface Serializer<String>origin - the object to cloneIOException - in case that cloning/serialization operations failpublic Class<String> getType()
SerializergetType in interface Serializer<String>Copyright © 2022. All rights reserved.