code: protected final void end(boolean completed)
          throws AsynchronousCloseException
      {
          blockedOn(null);
          Thread interrupted = this.interrupted;
          if (interrupted != null && interrupted == Thread.currentThread()) {
              interrupted = null;
              throw new ClosedByInterruptException();
          }
          if (!completed && !open)
              throw new AsynchronousCloseException();
      }
docs: Marks the end of an I/O operation that might block indefinitely.
  
  <p> This method should be invoked in tandem with the {@link #begin
  begin} method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block
  as shown <a href="#be">above</a>, in order to implement asynchronous
  closing and interruption for this channel.  </p>
  
  @param  completed
  <tt>true</tt> if, and only if, the I/O operation completed
  successfully, that is, had some effect that would be visible to
  the operation's invoker
  
  @throws  AsynchronousCloseException
  If the channel was asynchronously closed
  
  @throws  ClosedByInterruptException
  If the thread blocked in the I/O operation was interrupted