public interface Mappable<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.Optional<T> |
deserialize(java.io.InputStream inputStream) |
static <T> T |
deserializeUnsafe(java.io.InputStream inputStream) |
void |
readFrom(T object)
Reads all data from the provided
object to this object |
static java.util.Optional<byte[]> |
serialize(java.lang.Object object) |
static byte[] |
serializeUnsafe(java.lang.Object object) |
T |
writeTo(T object)
Writes all data from this object to the provided
object. |
T writeTo(T object)
object.
Fields that are null in this object but not null
in the target object should not be overwritten.
object - Object to write data tovoid readFrom(T object)
object to this object
Fields that are null in the provided object but not null
this object should not be overwritten.
object - Object to read data fromstatic byte[] serializeUnsafe(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionstatic java.util.Optional<byte[]> serialize(java.lang.Object object)
static <T> T deserializeUnsafe(java.io.InputStream inputStream)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionstatic <T> java.util.Optional<T> deserialize(java.io.InputStream inputStream)