All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class magician.Node.SPObjectInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----java.io.ObjectInputStream
                   |
                   +----magician.Node.SPObjectInputStream

public class SPObjectInputStream
extends ObjectInputStream
implements ObjectInput
This class implements the stream that reads in the serialized SmartPacket object from the bytes off the wire


Constructor Index

 o SPObjectInputStream(InputStream, SmartPacketLoader)
initializes stream with appropriate Smartpacket loader

Method Index

 o resolveClass(ObjectStreamClass)
overrides default implementation so that when trying to resolve a class for this input stream, calls custom packet loader
 o setLoader(SmartPacketLoader)
Set the loader associated with this stream

Constructors

 o SPObjectInputStream
 SPObjectInputStream(InputStream in,
                     SmartPacketLoader SPL) throws IOException, StreamCorruptedException
initializes stream with appropriate Smartpacket loader

Parameters:
in - the input stream
SPL - the SmartPacket loader
Throws: IOException
if the object cannot be read
Throws: StreamCorruptedException
if the object cannot be reconstructed
See Also:
SmartPacketLoader, OnTheWirePacket

Methods

 o setLoader
 public void setLoader(SmartPacketLoader SPL)
Set the loader associated with this stream

Parameters:
SPL - the Smartpacket loader
See Also:
SmartPacketLoader
 o resolveClass
 protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException
overrides default implementation so that when trying to resolve a class for this input stream, calls custom packet loader

Parameters:
v - the ObjectStreamClass
Throws: IOException
if the class cannot be read from the stream
Throws: ClassNotFoundException
if the class is not available
Overrides:
resolveClass in class ObjectInputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1