com.sun.electric.database
Class EObjectInputStream.Key<T>

java.lang.Object
  extended by com.sun.electric.database.EObjectInputStream.Key<T>
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Enclosing class:
EObjectInputStream

public abstract static class EObjectInputStream.Key<T>
extends java.lang.Object
implements java.io.Externalizable

See Also:
Serialized Form

Constructor Summary
EObjectInputStream.Key()
           
EObjectInputStream.Key(T obj)
           
 
Method Summary
abstract  T readExternal(EObjectInputStream in)
          The oclass implements the readExternal method to restore an object by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
 void readExternal(java.io.ObjectInput in)
           
abstract  void writeExternal(EObjectOutputStream out, T obj)
          The class implements the writeExternal method to save an object by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EObjectInputStream.Key

public EObjectInputStream.Key(T obj)

EObjectInputStream.Key

public EObjectInputStream.Key()
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public abstract void writeExternal(EObjectOutputStream out,
                                   T obj)
                            throws java.io.IOException
The class implements the writeExternal method to save an object by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. This method can get context by methods of EObjectOutputStream like getDatabase and getIdManager.

Parameters:
out - the EObjectOutputStream stream to write the object to
obj - object to save
Throws:
java.io.IOException - Includes any I/O exceptions that may occur

readExternal

public abstract T readExternal(EObjectInputStream in)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
The oclass implements the readExternal method to restore an object by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal. This method can get context by methods of EObjectOutputStream like getDatabase and getIdManager.

Parameters:
in - the stream to read data from in order to restore the object
Returns:
restored object
Throws:
java.io.IOException - if I/O errors occur
java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.