public void close() throws IOException, InterruptedException {
  channel.close();
  channel.join();
  if (ownsPool)   pool.shutdown();
  for (  Closeable c : closables)   c.close();
}

public void close ( ) throws IOException , InterruptedException { channel . close ( ) ; channel . join ( ) ; if ( ownsPool ) pool . shutdown ( ) ; for ( Closeable c : closables ) c . close ( ) ; }
shuts down the channel and closes the underlying connection .
