Class SerializationUtils.ClassLoaderAwareObjectInputStream

java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
org.apache.commons.lang3.SerializationUtils.ClassLoaderAwareObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable
Enclosing class:
SerializationUtils

static final class SerializationUtils.ClassLoaderAwareObjectInputStream extends ObjectInputStream
Custom specialization of the standard JDK ObjectInputStream that uses a custom ClassLoader to resolve a class. If the specified ClassLoader is not able to resolve the class, the context classloader of the current thread will be used. This way, the standard deserialization work also in web-application containers and application servers, no matter in which of the ClassLoader the particular class that encapsulates serialization/deserialization lives.

For more in-depth information about the problem for which this class here is a workaround, see the JIRA issue LANG-626.