protected final void end (boolean completed) throws AsynchronousCloseException

Marks the end of an I/O operation that might block indefinitely.

This method should be invoked in tandem with the begin method, using a try ...  finally block as shown above, in order to implement asynchronous closing and interruption for this channel.

completed     true if, and only if, the I/O operation completed successfully, that is, had some effect that would be visible to the operation's invoker

AsynchronousCloseException     If the channel was asynchronously closed
ClosedByInterruptException     If the thread blocked in the I/O operation was interrupted