IO, NIO and Threading

Well, never thought about the issue, but apparently InputStream.read() is able to throw an instance of InterruptedException at its caller, while the interface states only the IOException. It's quite possible that I miss something, but anyway. Java NIO is a bit leaner in this regard as we have the ClosedByInterruptException.

No comments: