@Override synchronized public final SelectionKey keyFor(Selector selector){
  for (  SelectionKey key : keyList) {
    if (key != null && key.selector() == selector) {
      return key;
    }
  }
  return null;
}

@ Override synchronized public final SelectionKey keyFor ( Selector selector ) { for ( SelectionKey key : keyList ) { if ( key != null && key . selector ( ) == selector ) { return key ; } } return null ; }
gets this channel ' s selection key for the specified selector .
