To add on to Mureinik's solution:
If you would like to differentiate the error handling for each of the subclasses you could use instanceof
within the catch block something like:
FileNotFoundException is subclass of IOException
catch (IOException e) {
if (e instanceof FileNotFoundException)
{
System.out.println("FileNotFoundException");
}
else if(e instanceof IOException)
{
System.out.println("IOException");
}
}