ObjectOutputStream
that implements the dynamic class loading semantics of Java(TM) Remote Method Invocation (Java RMI) argument and result marshalling (using {@link RMIClassLoader}). A MarshalOutputStream
writes data that is intended to be written by a corresponding {@link MarshalInputStream}. MarshalOutputStream
implements the output side of the dynamic class loading semantics by overriding {@link ObjectOutputStream#annotateClass annotateClass} and {@link ObjectOutputStream#annotateProxyClass annotateProxyClass} toannotate class descriptors in the stream with codebase strings obtained using {@link RMIClassLoader#getClassAnnotation RMIClassLoader.getClassAnnotation}.
MarshalOutputStream
writes class annotations to its own stream; a subclass may override the {@link #writeAnnotation writeAnnotation} method to write the class annotations to adifferent location.
MarshalOutputStream
does not modify the stream protocol version of its instances' superclass state (see {@link ObjectOutputStream#useProtocolVersion ObjectOutputStream.useProtocolVersion}).
@author Sun Microsystems, Inc.
@since 2.0
A new MarshalOutputStream is constructed to serialize remote objects or graphs containing remote objects. Objects are written to the stream using the ObjectOutputStream.writeObject method.
MarshalOutputStream maps remote objects to the corresponding remote stub and embeds the location from which to load the stub classes. The location may be ignored by the client but is supplied.
|
|