Class DataFormatException in Java

Share and Enjoy !

Class DataFormatException in Java

DataFormatException signals that invalid or corrupt data has been encountered while uncompressing data.

A DataFormatException is thrown when data is not in the expected format, which can mean that the data is invalid or corrupt. In particular, the inflate() methods of Inflater throw this exception if they encounter data in an unexpected format.

The class structure of  class DataFormatException is given as

public class java.util.zip.DataFormatException extends java.lang.Exception {
// Public Constructors
public DataFormatException();//This constructor creates a DataFormatException with no associated detail message.
public DataFormatException(String s);//This constructor creates a DataFormatException with the specified detail message.
}

The class DataFormatException 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 !

READ  Class Date in Java

Leave a Reply

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