public class SerializationHelper extends Object
Constructor and Description |
---|
SerializationHelper()
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
deserialize(byte[] byteArray)
Deserialize a byte array of an object.
|
static <T extends Serializable> |
serialize(T object)
Serialize an object.
|
@Nonnull public static <T extends Serializable> byte[] serialize(@Nonnull T object) throws IOException
object
- The object to serialize.IOException
@Nonnull public static <T> T deserialize(@Nonnull byte[] byteArray) throws IOException, ClassNotFoundException
byteArray
- The byte array serialized from an object.ClassNotFoundException
-
On failure finding target class.
IOException