FileDocCategorySizeDatePackage
ClassLoaderObjectInputStream.javaAPI DocApache James 2.3.12617Fri Jan 12 12:56:34 GMT 2007org.apache.james.util.io

ClassLoaderObjectInputStream

public class ClassLoaderObjectInputStream extends ObjectInputStream
A special ObjectInputStream to handle highly transient classes hosted by Avalon components that are juggling many classloaders.
author
Paul Hammant
version
$Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $

Fields Summary
private ClassLoader
m_classLoader
Constructors Summary
public ClassLoaderObjectInputStream(ClassLoader classLoader, InputStream inputStream)

        super( inputStream );
        m_classLoader = classLoader;
    
Methods Summary
protected java.lang.ClassresolveClass(java.io.ObjectStreamClass objectStreamClass)

        final Class clazz =
            Class.forName( objectStreamClass.getName(), false, m_classLoader );

        if( null != clazz )
        {
            return clazz; // the classloader knows of the class
        }
        else
        {
            // classloader knows not of class, let the super classloader do it
            return super.resolveClass( objectStreamClass );
        }