Class SerializationUtils

java.lang.Object
org.springframework.util.SerializationUtils

public abstract class SerializationUtils extends Object
Static utilities for serialization and deserialization.
Since:
3.0.5
Author:
Dave Syer
  • Constructor Details

    • SerializationUtils

      public SerializationUtils()
  • Method Details

    • serialize

      @Nullable public static byte[] serialize(@Nullable Object object)
      Serialize the given object to a byte array.
      Parameters:
      object - the object to serialize
      Returns:
      an array of bytes representing the object in a portable fashion
    • deserialize

      @Nullable public static Object deserialize(@Nullable byte[] bytes)
      Deserialize the byte array into an object.
      Parameters:
      bytes - a serialized object
      Returns:
      the result of deserializing the bytes