| java.lang.Object java.io.InputStream java.io.ObjectInputStream sun.rmi.server.MarshalInputStream
All known Subclasses: sun.rmi.transport.ConnectionInputStream,
MarshalInputStream | public class MarshalInputStream extends ObjectInputStream (Code) | | MarshalInputStream is an extension of ObjectInputStream. When resolving
a class, it reads an object from the stream written by a corresponding
MarshalOutputStream. If the class to be resolved is not available
locally, from the first class loader on the execution stack, or from the
context class loader of the current thread, it will attempt to load the
class from the location annotated by the sending MarshalOutputStream.
This location object must be a string representing a path of URLs.
A new MarshalInputStream should be created to deserialize remote objects or
graphs containing remote objects. Objects are created from the stream
using the ObjectInputStream.readObject method.
author: Peter Jones version: 1.44, 07/05/05 |
Method Summary | |
public void | close() Closes this stream, implicitly invoking done() first. | public void | done() Indicates that the user of this MarshalInputStream is done reading
objects from it, so all callbacks registered with the setDoneCallback
method should now be (synchronously) executed. | public Runnable | getDoneCallback(Object key) Returns a callback previously registered via the setDoneCallback
method with given key, or null if no callback has yet been registered
with that key. | protected Object | readLocation() Return the location for the class in the stream. | protected Class | resolveClass(ObjectStreamClass classDesc) resolveClass is extended to acquire (if present) the location
from which to load the specified class. | protected Class | resolveProxyClass(String[] interfaces) resolveProxyClass is extended to acquire (if present) the location
to determine the class loader to define the proxy class in. | public void | setDoneCallback(Object key, Runnable callback) Registers a callback to make when this stream's done() method is
invoked, along with a key for retrieving the same callback instance
subsequently from the getDoneCallback method. | void | skipDefaultResolveClass() Set a flag to indicate that the superclass's default resolveClass()
implementation should not be invoked by our resolveClass(). | void | useCodebaseOnly() Disable code downloading except from the URL specified by the
"java.rmi.server.codebase" property. |
permittedSunClasses | protected static Map permittedSunClasses(Code) | | table to hold sun classes to which access is explicitly permitted
|
close | public void close() throws IOException(Code) | | Closes this stream, implicitly invoking done() first.
|
done | public void done()(Code) | | Indicates that the user of this MarshalInputStream is done reading
objects from it, so all callbacks registered with the setDoneCallback
method should now be (synchronously) executed. When this method
returns, there are no more callbacks registered.
This method is implicitly invoked by close() before it delegates to
the superclass's close method.
|
getDoneCallback | public Runnable getDoneCallback(Object key)(Code) | | Returns a callback previously registered via the setDoneCallback
method with given key, or null if no callback has yet been registered
with that key.
|
readLocation | protected Object readLocation() throws IOException, ClassNotFoundException(Code) | | Return the location for the class in the stream. This method can
be overridden by subclasses that store this annotation somewhere
else than as the next object in the stream, as is done by this class.
|
setDoneCallback | public void setDoneCallback(Object key, Runnable callback)(Code) | | Registers a callback to make when this stream's done() method is
invoked, along with a key for retrieving the same callback instance
subsequently from the getDoneCallback method.
|
skipDefaultResolveClass | void skipDefaultResolveClass()(Code) | | Set a flag to indicate that the superclass's default resolveClass()
implementation should not be invoked by our resolveClass().
|
useCodebaseOnly | void useCodebaseOnly()(Code) | | Disable code downloading except from the URL specified by the
"java.rmi.server.codebase" property.
|
Methods inherited from java.io.ObjectInputStream | public int available() throws IOException(Code)(Java Doc) public void close() throws IOException(Code)(Java Doc) public void defaultReadObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected boolean enableResolveObject(boolean enable) throws SecurityException(Code)(Java Doc) public int read() throws IOException(Code)(Java Doc) public int read(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public boolean readBoolean() throws IOException(Code)(Java Doc) public byte readByte() throws IOException(Code)(Java Doc) public char readChar() throws IOException(Code)(Java Doc) protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException(Code)(Java Doc) public double readDouble() throws IOException(Code)(Java Doc) public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException(Code)(Java Doc) public float readFloat() throws IOException(Code)(Java Doc) public void readFully(byte[] buf) throws IOException(Code)(Java Doc) public void readFully(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public int readInt() throws IOException(Code)(Java Doc) public String readLine() throws IOException(Code)(Java Doc) public long readLong() throws IOException(Code)(Java Doc) final public Object readObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object readObjectOverride() throws IOException, ClassNotFoundException(Code)(Java Doc) public short readShort() throws IOException(Code)(Java Doc) protected void readStreamHeader() throws IOException, StreamCorruptedException(Code)(Java Doc) public String readUTF() throws IOException(Code)(Java Doc) public Object readUnshared() throws IOException, ClassNotFoundException(Code)(Java Doc) public int readUnsignedByte() throws IOException(Code)(Java Doc) public int readUnsignedShort() throws IOException(Code)(Java Doc) public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException(Code)(Java Doc) protected Class> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object resolveObject(Object obj) throws IOException(Code)(Java Doc) protected Class> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException(Code)(Java Doc) public int skipBytes(int len) throws IOException(Code)(Java Doc)
|
|
|