CustomObjectInputStreampublic final class CustomObjectInputStream extends ObjectInputStream Custom subclass of ObjectInputStream that loads from the
class loader for this web application. This allows classes defined only
with the web application to be found correctly. |
Fields Summary |
---|
private ClassLoader | classLoaderThe class loader we will use to resolve classes. |
Constructors Summary |
---|
public CustomObjectInputStream(InputStream stream, ClassLoader classLoader)Construct a new instance of CustomObjectInputStream
super(stream);
this.classLoader = classLoader;
|
Methods Summary |
---|
public java.lang.Class | resolveClass(java.io.ObjectStreamClass classDesc)Load the local class equivalent of the specified stream class
description, by using the class loader assigned to this Context.
return Class.forName(classDesc.getName(), false, classLoader);
|
|