Class StreamCorruptedException in java

Class StreamCorruptedException in java

A StreamCorruptedException is thrown during object deserialization to indicate that the stream being read is corrupted and doesn’t contain valid serialized object data.

The structure of the class StreamCorruptedException is given by

public class java.io.StreamCorruptedException
extends java.io.ObjectStreamException {
// Constructors
public StreamCorruptedException();//This constructor creates a StreamCorruptedException with no reason string.
public StreamCorruptedException(String reason); //This constructor creates a StreamCorruptedException with the specified reason string.
}

The class StreamCorruptedException also inherits methods from class Object and Throwable.

From Object classFrom Throwable class
clone()fillInStackTrace()
getClass()getMessage()
notify()printStackTrace()
wait()printStackTrace(PrintWriter)
wait(long, int)getLocalizedMessage()
wait(long)printStackTrace(PrintStream)
equals(Object)
toString()
finalize()
hashCode()
notifyAll()

Share and Enjoy !

See also  Abstract Class HttpURLConnection in Java

Leave a Reply

Your email address will not be published. Required fields are marked *