spring-framework / org.springframework.util / SerializationUtils / serialize

serialize

@Nullable open static fun serialize(@Nullable object: Any): ByteArray

Serialize the given object to a byte array.

Parameters

object - the object to serialize

Return
an array of bytes representing the object in a portable fashion