T - the type of (de)serialized objectsU - the type of the basic representation of the objects@ParametersAreNonnullByDefault public interface Serializer<T,U> extends Converter<T,U>
Objects.| Modifier and Type | Method and Description |
|---|---|
default U |
convert(T t)
Returns a representation of
t as an instance of type R. |
T |
deserialize(U data)
Reads and assembles an object of type
T from the given data. |
default T |
revert(U data)
Returns a representation of
r as an instance of type T. |
U |
serialize(T t)
Write an object of type
T into its basic representation. |
@Nonnull default U convert(T t)
t as an instance of type R.convert in interface Converter<T,U>t - the instance to convertserialize(Object)@Nonnull default T revert(U data)
r as an instance of type T.revert in interface Converter<T,U>data - the instance to convertdeserialize(Object)@Nonnull U serialize(T t) throws IOException
T into its basic representation.t - the object to serializeIOException - if an I/O error occurs during the serialization@Nonnull T deserialize(U data) throws IOException
T from the given data.data - the basic representation of the objectIOException - if an I/O error occurs during the deserializationCopyright © 2017–2019 Atlanmod. All rights reserved.