public class DefaultDeserializer extends java.lang.Object implements Deserializer<java.lang.Object>
Deserializer
implementation that reads an input stream
using Java serialization.ObjectInputStream
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 . |
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. |
public DefaultDeserializer()
DefaultDeserializer
with default ObjectInputStream
configuration, using the "latest user-defined ClassLoader".public DefaultDeserializer(@Nullable java.lang.ClassLoader classLoader)
DefaultDeserializer
for using an ObjectInputStream
with the given ClassLoader
.ConfigurableObjectInputStream.ConfigurableObjectInputStream(InputStream, ClassLoader)
public java.lang.Object deserialize(java.io.InputStream inputStream) throws java.io.IOException
InputStream
and deserialize the contents
into an object.deserialize
in interface Deserializer<java.lang.Object>
inputStream
- the input streamjava.io.IOException
- in case of errors reading from the streamObjectInputStream.readObject()