public class

ConfigurableObjectInputStream

extends ObjectInputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ java.io.ObjectInputStream
       ↳ org.springframework.core.ConfigurableObjectInputStream
Known Direct Subclasses

Class Overview

Special ObjectInputStream subclass that resolves class names against a specific ClassLoader. Serves as base class for CodebaseAwareObjectInputStream.

Summary

[Expand]
Inherited Constants
From interface java.io.ObjectStreamConstants
[Expand]
Inherited Fields
From interface java.io.ObjectStreamConstants
Public Constructors
ConfigurableObjectInputStream(InputStream in, ClassLoader classLoader)
Create a new ConfigurableObjectInputStream for the given InputStream and ClassLoader.
Protected Methods
ClassLoader getFallbackClassLoader()
Return the fallback ClassLoader to use when no ClassLoader was specified and ObjectInputStream's own default ClassLoader failed.
Class resolveClass(ObjectStreamClass classDesc)
Class resolveFallbackIfPossible(String className, ClassNotFoundException ex)
Resolve the given class name against a fallback class loader.
Class resolveProxyClass(String[] interfaces)
[Expand]
Inherited Methods
From class java.io.ObjectInputStream
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.io.DataInput
From interface java.io.ObjectInput

Public Constructors

public ConfigurableObjectInputStream (InputStream in, ClassLoader classLoader)

Also: SpringCore

Create a new ConfigurableObjectInputStream for the given InputStream and ClassLoader.

Parameters
in the InputStream to read from
classLoader the ClassLoader to use for loading local classes
Throws
IOException

Protected Methods

protected ClassLoader getFallbackClassLoader ()

Also: SpringCore

Return the fallback ClassLoader to use when no ClassLoader was specified and ObjectInputStream's own default ClassLoader failed.

The default implementation simply returns null.

Throws
IOException

protected Class resolveClass (ObjectStreamClass classDesc)

protected Class resolveFallbackIfPossible (String className, ClassNotFoundException ex)

Also: SpringCore

Resolve the given class name against a fallback class loader.

The default implementation simply rethrows the original exception, since there is no fallback available.

Parameters
className the class name to resolve
ex the original exception thrown when attempting to load the class
Returns
  • the newly resolved class (never null)

protected Class resolveProxyClass (String[] interfaces)