Package com.ranull.graves.util
Class Base64Util
java.lang.Object
com.ranull.graves.util.Base64Util
Utility class for serializing and deserializing objects to and from Base64 strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
base64ToObject
(String string) Deserializes a Base64 encoded string back to an object.static String
objectToBase64
(Object object) Serializes an object to a Base64 encoded string.
-
Constructor Details
-
Base64Util
public Base64Util()
-
-
Method Details
-
objectToBase64
Serializes an object to a Base64 encoded string.- Parameters:
object
- The object to serialize.- Returns:
- The Base64 encoded string representing the serialized object, or null if an error occurs.
-
base64ToObject
Deserializes a Base64 encoded string back to an object.- Parameters:
string
- The Base64 encoded string to deserialize.- Returns:
- The deserialized object, or null if an error occurs.
-