Nuxeo Enterprise Platform 5.4

org.nuxeo.common.utils
Class SerializableHelper

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

public final class SerializableHelper
extends java.lang.Object

Helper to test object serialization. Used only in tests.

Author:
Julien Anguenot

Method Summary
static boolean isSerializable(java.lang.Object ob)
          Checks if a given object is serializable.
static java.lang.Object serializeUnserialize(java.lang.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(java.lang.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 java.lang.Object serializeUnserialize(java.lang.Object ob)
                                             throws java.lang.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:
java.lang.Exception

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.