Class DeserializingConverter

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

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

    • DeserializingConverter

      public&nbsp;DeserializingConverter()
      Create a DeserializingConverter with default ObjectInputstream configuration, using the "latest user-defined ClassLoader".
      see Also:
    • DeserializingConverter

      public&nbsp;DeserializingConverter(@Nullable ClassLoader&nbsp;classLoader)
      Create a DeserializingConverter for using an ObjectInputstream with the given ClassLoader.
      Parameters:
      classLoader - the ClassLoader to use
      since:
      4.2.1
      see Also:
    • DeserializingConverter

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

    • convert

      public&nbsp;Object&nbsp;convert(byte[]&nbsp;source)
      Description copied from interface:&nbsp;Converter
      Convert the source object of type s to target type T.
      specified by:
      convert&nbsp;in interface&nbsp;Converter<byte[],Object>
      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)