May I generalize that any operation with a file may cause IOException (IOE)? Including just reading a file, just checking its attributes (name, timestamp)?
I am trying to find logic in API methods throwing IOException, so I try to understand and make a general rule rather to memorize.
FileInputStream / FileOutputStream constructor don't throw IOException (they throw its child FileNotFoundException thou) - but this is not working with file yet, it is just preparing for it - another method would access a file given FileInputStream / FileOutputStream as argument.
- So far my generalization holds everywhere. Any cases this generalization is wrong (exceptions or wrong in principle)?
- Is there any other generalization concerning checked Exceptions (maybe IOE concerning sockets or any other checked exception besides IOE)?
May be there are some OS internals that help generalize it understanding some general ideas happening on OS Level?