if (keys == null) return null;
ListIterator it = keys.listIterator();
  private SelectionKey locate (Selector selector)  {    if (keys == null)      return null;        SelectionKey k = null;    ListIterator it = keys.listIterator ();        while (it.hasNext ())      {    	k = (SelectionKey) it.next ();    	if (k.selector () == selector)          {            return k;          }      }        return k;  }