Thrown when the validateObject method cannot make the object valid,
thus aborting the deserialization.NotActiveExceptionextends ObjectStreamExceptionThrown when a serialization method, such as defaultReadObject, is
invoked when serialization is not under way on the stream.NotSerializableExceptionextends ObjectStreamExceptionThrown either by the serialization mechanism or explicitly by a class when a
class cannot be serialized.ObjectStreamExceptionextends IOExceptionThe superclass for all the Object stream related exceptions.OptionalDataExceptionextends ObjectStreamExceptionThrown when the optional data (that is, not part of default serialization) in the
object input stream is corrupt or was not read by the reading method.StreamCorruptedExceptionextends ObjectStreamExceptionThrown when internal object stream state is missing or invalid.SyncFailedExceptionextends IOExceptionThrown by FileDescriptor.sync when the data cannot be guaranteed
to have been written to the underlying media.UnsupportedEncodingExceptionextends IOExceptionThrown when an unknown character encoding is specified.UTFDataFormatExceptionextends IOExceptionThrown by DataInputStream.readUTF when the string it is reading
has malformed UTF syntax.WriteAbortedExceptionextends ObjectStreamExceptionThrown when an exception occurred during a serialization write operation.In addition to these specific exceptions, other exceptional conditions in java.io are signaled with an
IOException containing a string that describes the specific error encountered. For example, using a
Piped stream object that has never been connected throws an exception object with a detail string such as
"Pipenotconnected", and trying to push more than the allowed number of characters onto a
PushbackReader tHRows an exception with the string "Pushbackbufferoverflow". Such
exceptions are difficult to catch explicitly, so this style of exception reporting is not in favor. Specific
exception subtypes should be created for each category of exceptional circumstance.