Class Serializer
java.lang.Object
com.github.gbenroscience.util.Serializer
1. Interface must extend Serializable for ObjectOutputStream to work.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTest Class: Must be static so it doesn't try to serialize the "Serializer" class along with it. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Serializable>
TdeepClone(T object) Performs a 100% deep clone of any Serializable object (including 2D arrays).static final Savabledeserialize(String encoded) Reconstructs an object from a Base64 encoded string.static voidstatic final byte[]ser(Serializable yourObject) Internal: Object to Byte Arraystatic final StringConverts an object to a Base64 encoded string.
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
serialize
-
deserialize
-
ser
Internal: Object to Byte Array -
deepClone
Performs a 100% deep clone of any Serializable object (including 2D arrays).- Type Parameters:
T- The type of the object- Parameters:
object- The object to clone- Returns:
- A completely independent copy of the object
-
main
-