These are the following scenario where mostly IOException can be thrown:
1. If you are reading some network file and suddenly got disconnected.
2. If you are streaming to read data and in the meantime, some other process closed that stream.
3. If you want to read or write some files, but due to permission issues you cannot able to do that.
4. Want to read some local files, but not available.
5. Go to write any file, but the disk space is not available.
I hope this will help.
Want to become a Java Expert? Join Java Course now!!