Class SerializationHelper


  • public final class SerializationHelper
    extends java.lang.Object
    Serialization and deserialization tester.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T serializeAndDeserializeBack​(T t)
      Serializes and deserializes given object back.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • serializeAndDeserializeBack

        public static <T> T serializeAndDeserializeBack​(T t)
                                                 throws java.io.IOException,
                                                        java.lang.ClassNotFoundException
        Serializes and deserializes given object back.
        Type Parameters:
        T - serialized type
        Parameters:
        t - object to serialize and deserialize
        Returns:
        deserialized copy
        Throws:
        java.lang.ClassNotFoundException - if serialized object cannon be found
        java.io.IOException - if any exception thrown by the underlying OutputStream