Class IOException in Java

digitization, transformation, binary

Class IOException in Java

IOException is thrown from an application to indicate that an IOException or some sort of Exception has occurred. It also covers the general IO failures and the inability to read from a file.

The IOException class is the superclass for all of the exceptions that represent anything that can go wrong with input or output.

Ads code goes here

The structure of the class IOException  is given as:

public class java.io.IOException extends java.lang.Exception{
//constructor
public IOException();
public IOException(String message);
}

The details of the methods are given as:

public IOException();

public IOException() constructor constructs an empty IOException object that is an object with no message specified.

public IOException(String message);

public IOException(String message) constructor constructs an IOException object with the message specified.

Parameter
message-The detail message.
The class IOException 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 Float in Java

Leave a Comment

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