Save This Page
Home » openjdk-7 » sun.rmi » server » [javadoc | source]
sun.rmi.server
public class: MarshalInputStream [javadoc | source]
java.lang.Object
   java.io.InputStream
      java.io.ObjectInputStream
         sun.rmi.server.MarshalInputStream

All Implemented Interfaces:
    ObjectStreamConstants, ObjectInput, Closeable

Direct Known Subclasses:
    ConnectionInputStream

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.
Field Summary
protected static  Map permittedSunClasses    table to hold sun classes to which access is explicitly permitted 
Constructor:
 public MarshalInputStream(InputStream in) throws IOException, StreamCorruptedException 
    Create a new MarshalInputStream object.
Method from sun.rmi.server.MarshalInputStream Summary:
close,   done,   getDoneCallback,   readLocation,   resolveClass,   resolveProxyClass,   setDoneCallback,   skipDefaultResolveClass,   useCodebaseOnly
Methods from java.io.ObjectInputStream:
available,   close,   defaultReadObject,   read,   read,   readBoolean,   readByte,   readChar,   readDouble,   readFields,   readFloat,   readFully,   readFully,   readInt,   readLine,   readLong,   readObject,   readShort,   readUTF,   readUnshared,   readUnsignedByte,   readUnsignedShort,   registerValidation,   skipBytes
Methods from java.io.InputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.rmi.server.MarshalInputStream Detail:
 public  void close() throws IOException 
    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. 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.
 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() throws ClassNotFoundException, IOException 
    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.
 protected Class resolveClass(ObjectStreamClass classDesc) throws ClassNotFoundException, IOException 
    resolveClass is extended to acquire (if present) the location from which to load the specified class. It will find, load, and return the class.
 protected Class resolveProxyClass(String[] interfaces) throws ClassNotFoundException, IOException 
    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.