This method returns true if this print stream has ever encountered an error during its lifetime.
Most of the time, you just ignore this since print streams are only used in situations where exhaustive error checking is unnecessary.
There are a number of IOException subclasses scattered around the other packages, particularly
I. java.util.zip
- DataFormatException and
- ZipException
and
II. java.net
- BindException,
- ConnectException,
- MalformedURLException,
- NoRouteToHostException,
- ProtocolException,
- SocketException,
- UnknownHostException, and
- UnknownServiceException
The java.io.IOException class declares no public methods or fields of significance, just the usual two constructors you find in most exception classes:
public IOException()
public IOException(String message)
The first constructor creates an IOException with an empty message. The second provides more details about what went wrong.
Of course, IOException has the usual methods inherited by all exception classes such as toString() and printStackTrace().