ObjectInputStream
that implements the dynamic class loading semantics of Java(TM) Remote Method Invocation (Java RMI) argument and result unmarshalling (using {@link RMIClassLoader}). A MarshalInputStream
is intended to read data written by a corresponding {@link MarshalOutputStream}. MarshalInputStream
implements the input side of the dynamic class loading semantics by overriding {@link ObjectInputStream#resolveClass resolveClass} and {@link ObjectInputStream#resolveProxyClass resolveProxyClass} to resolveclass descriptors in the stream using {@link ClassLoading#loadClass ClassLoading.loadClass} and {@link ClassLoading#loadProxyClass ClassLoading.loadProxyClass} (which, in turn, use {@link RMIClassLoader#loadClass(String,String,ClassLoader) RMIClassLoader.loadClass} and {@link RMIClassLoader#loadProxyClass(String,String[],ClassLoader) RMIClassLoader.loadProxyClass}), optionally with codebase annotation strings written by a MarshalOutputStream
.
By default, a MarshalInputStream
ignores all codebase annotation strings, instead using a codebase value of null
when loading classes. Codebase annotation strings will only be used by a MarshalInputStream
after its {@link #useCodebaseAnnotations useCodebaseAnnotations}method has been invoked.
MarshalInputStream
supports optional verification that all codebase annotation URLs that are used to load classes resolved by the stream provide content integrity (see {@link Security#verifyCodebaseIntegrity Security.verifyCodebaseIntegrity}). Whether or not a particular MarshalInputStream
instance verifies that codebase annotation URLs provide content integrity is determined by the verifyCodebaseIntegrity
constructor argument. See {@link ClassLoading#loadClass ClassLoading.loadClass} and {@link ClassLoading#loadProxyClass ClassLoading.loadProxyClass} fordetails of how codebase integrity verification is performed.
MarshalInputStream
reads class annotations from its own stream; a subclass can override the {@link #readAnnotation readAnnotation} method to read the class annotations from adifferent location.
A MarshalInputStream
is not guaranteed to be safe for concurrent use by multiple threads.
@author Sun Microsystems, Inc.
@since 2.0
|
|
|
|
|
|
|
|