|
  
    | 
ObjectStreamException | 
Superclass of all serialization exceptions. | 
  
    | 
InvalidClassException | 
Thrown when a class cannot be used to restore objects for any of these reasons:The class does not match the serial version of the class in the stream. 
The class contains fields with invalid primitive data types. 
The Externalizableclass does not have a public no-arg constructor. 
TheSerializableclass can not access the no-arg constructor of its closest non-Serializable superclass. | 
  
    | 
NotSerializableException | 
Thrown by a readObjectorwriteObjectmethod to terminate serialization or deserialization. | 
  
    | 
StreamCorruptedException | 
Thrown:If the stream header is invalid. 
If control information not found.  
If control information is invalid. 
JDKTM 1.1.5 or less attempts to call readExternalon a PROTOCOL_VERSION_2 stream. | 
  
    | 
NotActiveException | 
Thrown if writeObjectstate is invalid within the followingObjectOutputStreammethods: defaultWriteObjectputFieldswriteFields
 
Thrown if readObjectstate is invalid within the followingObjectInputStreammethods: defaultReadObjectreadFieldsregisterValidation | 
  
    | 
InvalidObjectException | 
Thrown when a restored object cannot be made valid. | 
  
    | 
OptionalDataException | 
Thrown by readObjectwhen there is primitive data in the stream and an object is expected. The length field of the exception indicates the number of bytes that are available in the current block. | 
  
    | 
WriteAbortedException | 
Thrown when reading a stream terminated by an exception that occurred while the stream was being written. |