org.apache.catalina.util

Class CustomObjectInputStream

public 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.

Version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Craig R. McClanahan Bip Thelin

Constructor Summary
CustomObjectInputStream(InputStream stream, ClassLoader classLoader)
Construct a new instance of CustomObjectInputStream
Method Summary
ClassresolveClass(ObjectStreamClass classDesc)
Load the local class equivalent of the specified stream class description, by using the class loader assigned to this Context.
protected ClassresolveProxyClass(String[] interfaces)
Return a proxy class that implements the interfaces named in a proxy class descriptor.

Constructor Detail

CustomObjectInputStream

public CustomObjectInputStream(InputStream stream, ClassLoader classLoader)
Construct a new instance of CustomObjectInputStream

Parameters: stream The input stream we will read from classLoader The class loader used to instantiate objects

Throws: IOException if an input/output error occurs

Method Detail

resolveClass

public Class resolveClass(ObjectStreamClass classDesc)
Load the local class equivalent of the specified stream class description, by using the class loader assigned to this Context.

Parameters: classDesc Class description from the input stream

Throws: ClassNotFoundException if this class cannot be found IOException if an input/output error occurs

resolveProxyClass

protected Class resolveProxyClass(String[] interfaces)
Return a proxy class that implements the interfaces named in a proxy class descriptor. Do this using the class loader assigned to this Context.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.