Closes a selectable channel.
This method is invoked by the channel's close method in order to perform the actual work of closing the channel. This method is only invoked if the channel has not yet been closed, and it is never invoked more than once by the channel's close implementation.
An implementation of this method must arrange for any other thread that is blocked in an I/O operation upon the channel to return immediately, either by throwing an exception or by returning normally. If the channel is registered
with one or more Selector
s then the file descriptor should not be released until the implReleaseChannel
method is invoked.