Programmatically determining the cause of IOException?
Unfortunately Java has no equivalent of .NET's System.Runtime.InteropServices.Marshal.GetHRForException()
. You tell what kind of I/O error it was only if the exception is an instance of a subclass, e.g. FileNotFoundException
.