In Java, is there any way to get(catch) all exceptions instead of catch the exception individually?
exceptions
Yes there is.
try { //Read/write file }catch(Exception ex) { //catches all exceptions extended from Exception (which is everything) }