public final class SerializationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Message |
deserializeObject(byte[] bytes)
Deserializes a message.
|
static <T extends Serializable> |
deserializeObject(byte[] bytes,
Class<T> clazz)
Deserializes an object.
|
static <T extends Serializable> |
serializeObject(T object)
Serializes an object.
|
public static <T extends Serializable> byte[] serializeObject(T object) throws IOException
object - a serializable objectIOExceptionpublic static <T extends Serializable> T deserializeObject(byte[] bytes, Class<T> clazz) throws IOException, ClassNotFoundException
bytes - a non-null array of bytesclazz - the class of the expected objectIOExceptionClassNotFoundExceptionpublic static Message deserializeObject(byte[] bytes) throws IOException, ClassNotFoundException
bytes - a non-null array of bytesClassNotFoundExceptionIOExceptionCopyright © 2015. All rights reserved.