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 also works in web application containers and application servers, regardless of which ClassLoader loaded the class that encapsulates serialization/deserialization.

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