org.springframework.core.serializer

Class DefaultDeserializer

  • java.lang.Object
    • org.springframework.core.serializer.DefaultDeserializer
  • All Implemented Interfaces:
    Deserializer<java.lang.Object>


    public class DefaultDeserializer
    extends java.lang.Object
    implements Deserializer<java.lang.Object>
    A default Deserializer implementation that reads an input stream using Java serialization.
    Since:
    3.0.5
    Author:
    Gary Russell, Mark Fisher, Juergen Hoeller
    See Also:
    ObjectInputStream
    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultDeserializer()
      Create a DefaultDeserializer with default ObjectInputStream configuration, using the "latest user-defined ClassLoader".
      DefaultDeserializer(java.lang.ClassLoader classLoader)
      Create a DefaultDeserializer for using an ObjectInputStream with the given ClassLoader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object deserialize(java.io.InputStream inputStream)
      Read from the supplied InputStream and deserialize the contents into an object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • deserialize

        public java.lang.Object deserialize(java.io.InputStream inputStream)
                                     throws java.io.IOException
        Read from the supplied InputStream and deserialize the contents into an object.
        Specified by:
        deserialize in interface Deserializer<java.lang.Object>
        Parameters:
        inputStream - the input stream
        Returns:
        the deserialized object
        Throws:
        java.io.IOException - in case of errors reading from the stream
        See Also:
        ObjectInputStream.readObject()