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: 1.3 $, $Date: 2004/02/27 14:58:50 $

Authors:
Craig R. McClanahan
Bip Thelin

Constructor Summary

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

Method Summary

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

Constructor Details

CustomObjectInputStream

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

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

Method Details

resolveClass

public Class resolveClass(ObjectStreamClass classDesc)
            throws ClassNotFoundException,
                   IOException
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


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.