Class serializingConverter

java.lang.Object
org.springframework.core.serializer.support.serializingConverter
All Implemented Interfaces:
Converter<Object,byte[]>

public class serializingConverter extends Object implements Converter<Object,byte[]>
A Converter that delegates to a serializer to convert an object to a byte array.
since:
3.0.5
Author:
Gary Russell, Mark Fisher
  • Constructor Details

    • serializingConverter

      public&nbsp;serializingConverter()
      Create a default serializingConverter that uses standard Java serialization.
    • serializingConverter

      public&nbsp;serializingConverter(serializer<Object>&nbsp;serializer)
      Create a serializingConverter that delegates to the provided serializer.
  • Method Details

    • convert

      public&nbsp;byte[]&nbsp;convert(Object&nbsp;source)
      serializes the source object and returns the byte array result.
      specified by:
      convert&nbsp;in interface&nbsp;Converter<Object,byte[]>
      Parameters:
      source - the source object to convert, which must be an instance of s (never null)
      Returns:
      the converted object, which must be an instance of T (potentially null)