Class Base64Util

java.lang.Object
com.ranull.graves.util.Base64Util

public final class Base64Util extends Object
Utility class for serializing and deserializing objects to and from Base64 strings.
  • Constructor Details

    • Base64Util

      public Base64Util()
  • Method Details

    • objectToBase64

      public static String objectToBase64(Object object)
      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

      public static Object base64ToObject(String string)
      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.