dist1.acb.common.transport
Class ObjectReaderWriter

java.lang.Object
  extended bydist1.acb.common.transport.ObjectReaderWriter

public class ObjectReaderWriter
extends java.lang.Object

Creates abstraction of method for object's reading/writing

Version:
$Revision: 1.2 $
Author:
Alexander Stasiv

Method Summary
static java.lang.Object read(java.io.ObjectInputStream in)
          Read an object from an ObjectInputStream
static void write(java.io.ObjectOutputStream out, java.lang.Object obj)
          Write the specified object to an ObjectOutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static java.lang.Object read(java.io.ObjectInputStream in)
                             throws java.io.IOException,
                                    java.lang.ClassNotFoundException
Read an object from an ObjectInputStream

Parameters:
in - The stream
Returns:
the object read from the stream
Throws:
java.io.IOException - Any of the usual Input/Output related exceptions
java.lang.ClassNotFoundException - Class of a serialized object cannot be found

write

public static void write(java.io.ObjectOutputStream out,
                         java.lang.Object obj)
                  throws java.io.IOException
Write the specified object to an ObjectOutputStream

Parameters:
out - The stream
obj - the object to be written
Throws:
java.io.IOException - Any exception thrown by the underlying OutputStream


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.