public interface Channel extends Closeable
Channels are open upon creation, and can be closed explicitly. Once a channel
is closed it cannot be re-opened, and any attempts to perform I/O operations
on the closed channel result in a
Particular implementations or sub-interfaces of
whether they are thread-safe or not.
void close() throws IOException
If an attempt is made to perform an operation on a closed channel then a
ClosedChannelException will be thrown on that attempt.
If multiple threads attempt to simultaneously close a channel, then only one thread will run the closure code, and others will be blocked until the first returns.