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