| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| private ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public Class | resolveClass(ObjectStreamClass
an instance of class cl)ObjectStreamClassOverrides java. |
| protected Class | resolveProxyClass(String[]
the list of interface names that were
deserialized in the proxy class descriptor interfaces)Overrides java. |
| _classloader | back to summary |
|---|---|
| private ThreadLocal<ClassLoader> _classloader | |
| ClassLoadingObjectInputStream | back to summary |
|---|---|
| public ClassLoadingObjectInputStream(InputStream in) throws IOException | |
| ClassLoadingObjectInputStream | back to summary |
|---|---|
| public ClassLoadingObjectInputStream() throws IOException | |
| readObject | back to summary |
|---|---|
| public Object readObject(ClassLoader loader) throws IOException, ClassNotFoundException | |
| resolveClass | back to summary |
|---|---|
| public Class Overrides java. Doc from java. Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in The default implementation of this method in
Class.forName(desc.getName(), false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader. If this call results in a
ClassNotFoundException and the name of the passed
ObjectStreamClass instance is the Java language keyword
for a primitive type or void, then the Class object
representing that primitive type or void will be returned
(e.g., an ObjectStreamClass with the name
"int" will be resolved to Integer.TYPE).
Otherwise, the ClassNotFoundException will be thrown to
the caller of this method.
| |
| resolveProxyClass | back to summary |
|---|---|
| protected Class Overrides java. Doc from java. Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class. This method is called exactly once for each unique proxy class descriptor in the stream. The corresponding method in The default implementation of this method in
Class.forName(i, false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader.
Unless any of the resolved interfaces are non-public, this same value
of loader is also the class loader passed to
Proxy.getProxyClass; if non-public interfaces are present,
their class loader is passed instead (if more than one non-public
interface class loader is encountered, an
IllegalAccessError is thrown).
If Proxy.getProxyClass throws an
IllegalArgumentException, resolveProxyClass
will throw a ClassNotFoundException containing the
IllegalArgumentException.
| |
| Modifier and Type | Field and Description |
|---|---|
| protected static final ClassLoader |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected ClassLoader | initialValue()
Overrides java. |
| UNSET | back to summary |
|---|---|
| protected static final ClassLoader UNSET | |
| ClassLoaderThreadLocal | back to summary |
|---|---|
| protected ClassLoaderThreadLocal() | |
| initialValue | back to summary |
|---|---|
| protected ClassLoader initialValue() Overrides java. Doc from java. Returns the current thread's "initial value" for this
thread-local variable. This method will be invoked the first
time a thread accesses the variable with the
| |