|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.ebi.intact.util.Serializer
Simple utility class for checking serialization for objects. Typically used in test cases to check particular objects whose serialization behaviour may be unknown.
Constructor Summary | |
Serializer()
|
Method Summary | |
protected static java.lang.Object |
deserialize(byte[] bytes)
simple method to deserialize an array of bytes. |
protected static byte[] |
serialize(java.io.Serializable obj)
simple method to serialize an object. |
static java.lang.Object |
serializeDeserialize(java.io.Serializable obj)
performs serialization and then deserialization. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Serializer()
Method Detail |
public static java.lang.Object serializeDeserialize(java.io.Serializable obj)
obj
- - the object to serialize
protected static byte[] serialize(java.io.Serializable obj) throws java.io.IOException
obj
- - an object to serialize
java.io.IOException
- thrown if the serialization failedprotected static java.lang.Object deserialize(byte[] bytes) throws java.io.IOException, java.lang.ClassNotFoundException
bytes
- - the array which should hopefully be an object (!)
java.io.IOException
- if there were byte stream problems
java.lang.ClassNotFoundException
- thrown if the object to construct cannot be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |