public void close(final SocketChannel channel){
  try {
    final Socket s=channel.socket();
    if (!s.isInputShutdown()) {
      s.shutdownInput();
    }
    if (!s.isOutputShutdown()) {
      s.shutdownOutput();
    }
    if (!s.isClosed()) {
      s.close();
    }
    channel.close();
  }
 catch (  final IOException e1) {
    s_logger.log(Level.FINE,"error closing channel",e1);
  }
  m_decoder.closed(channel);
  m_writer.closed(channel);
  m_reader.closed(channel);
}

public void close ( final SocketChannel channel ) { try { final Socket s = channel . socket ( ) ; if ( ! s . isInputShutdown ( ) ) { s . shutdownInput ( ) ; } if ( ! s . isOutputShutdown ( ) ) { s . shutdownOutput ( ) ; } if ( ! s . isClosed ( ) ) { s . close ( ) ; } channel . close ( ) ; } catch ( final IOException e1 ) { s_logger . log ( Level . FINE , "error closing channel" , e1 ) ; } m_decoder . closed ( channel ) ; m_writer . closed ( channel ) ; m_reader . closed ( channel ) ; }
close the channel , and clean up any data associated with it
