Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.common.utils
Class SerializableHelper

java.lang.Object
  extended by org.nuxeo.common.utils.SerializableHelper

public final class SerializableHelper
extends Object

Helper to test object serialization. Used only in tests.

Author:
Julien Anguenot

Method Summary
static boolean isSerializable(Object ob)
          Checks if a given object is serializable.
static Object serializeUnserialize(Object ob)
          Serializes and unserializes back an object to test whether it is correctly rebuilt (to be used in unit tests as sanity checks).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSerializable

public static boolean isSerializable(Object ob)
Checks if a given object is serializable.

Parameters:
ob - the actual object we want to test
Returns:
true if the object is serializable.

serializeUnserialize

public static Object serializeUnserialize(Object ob)
                                   throws Exception
Serializes and unserializes back an object to test whether it is correctly rebuilt (to be used in unit tests as sanity checks).

Parameters:
ob - the actual object we want to test
Returns:
true if the object is serializable.
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.