Class IOException in Java

0
152
digitization, transformation, binary
Spread the love

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.

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()


Spread the love
READ  Static and Non Static Inner Class in Java
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

LEAVE A REPLY

Please enter your comment!
Please enter your name here