br.shob
Class ShobObjectInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.ObjectInputStream
              |
              +--br.shob.ShobObjectInputStream
All Implemented Interfaces:
DataInput, ObjectInput, ObjectStreamConstants

public class ShobObjectInputStream
extends ObjectInputStream

This is a special ObjectInputStream used in the Communication Layer that uses the given class loader to deserialize objects. Tipically, this classloader is a ShobClassLoader, a class loader that can dinamically locate, download and define a class previously unknown to this virtual machine.

Version:
$Revision: 1.5 $
Author:
dukejeffrie, crolmos
Created:
31 de Agosto de 2002

Field Summary
protected  ClassLoader loader
          The class loader used to deserialize shared objects
 
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
 
Constructor Summary
ShobObjectInputStream(InputStream stream, ClassLoader loader)
          Constructor for the ShobObjectInputStream object
 
Method Summary
protected  Class resolveClass(ObjectStreamClass desc)
          Uses its internal class loader to load the classes of the objects read from the stream
 
Methods inherited from class java.io.ObjectInputStream
available, close, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUnshared, readUnsignedByte, readUnsignedShort, readUTF, registerValidation, resolveObject, resolveProxyClass, skipBytes
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectInput
read, skip
 

Field Detail

loader

protected ClassLoader loader
The class loader used to deserialize shared objects

Constructor Detail

ShobObjectInputStream

public ShobObjectInputStream(InputStream stream,
                             ClassLoader loader)
                      throws IOException
Constructor for the ShobObjectInputStream object

Parameters:
stream - The underlying input stream
loader - a class loader to load classes for objects read from the stream
Throws:
IOException - if an ObjectInputStream cannot be created over the argument input stream
Method Detail

resolveClass

protected Class resolveClass(ObjectStreamClass desc)
                      throws IOException,
                             ClassNotFoundException
Uses its internal class loader to load the classes of the objects read from the stream

Overrides:
resolveClass in class ObjectInputStream
Parameters:
desc - Description of the Parameter
Returns:
Description of the Return Value
Throws:
IOException - Description of the Exception
ClassNotFoundException - Description of the Exception