if (!isConnected() && !connectionPending)
if (!connectionPending)
  public boolean finishConnect ()    throws IOException  {    if (!isOpen())      throw new ClosedChannelException();        if (!isConnected() && !connectionPending)      throw new NoConnectionPendingException();        if (isConnected())      return true;    // FIXME: Handle blocking/non-blocking mode.    Selector selector = provider().openSelector();    register(selector, SelectionKey.OP_CONNECT);    if (isBlocking())      {        selector.select(); // blocking until channel is connected.        connectionPending = false;        return true;  }        int ready = selector.selectNow(); // non-blocking    if (ready == 1)  {        connectionPending = false;	    return true;      }    return false;  }