org.jdesktop.test
Class SerializableSupport

java.lang.Object
  extended by org.jdesktop.test.SerializableSupport

public final class SerializableSupport
extends Object

Support class to test serializable behaviour.

Author:
Jesse Wilson

Method Summary
static
<T> T
encode(T object)
          Encodes an object as XML and then decodes it.
static
<T> T
serialize(T object)
          Serialize the specified object to bytes, then deserialize it back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

serialize

public static <T> T serialize(T object)
Serialize the specified object to bytes, then deserialize it back.


encode

public static <T> T encode(T object)
Encodes an object as XML and then decodes it.

Type Parameters:
T - the type to operate on
Parameters:
object - the object to encode/decode
Returns:
a copy of the original object that was encoded and decoded
See Also:
XMLEncoder, XMLDecoder


Copyright © 2013. All Rights Reserved.