serverSocket.getPlainSocketImpl().setInChannelOperation(true);    NIOSocket socket = (NIOSocket) serverSocket.accept(); completed = true; return socket.getChannel(); } catch (SocketTimeoutException e) { return null;
VMChannel client = channel.accept(); if (client == null) return null; else { completed = true; return new SocketChannelImpl(provider(), client, false); }
  public SocketChannel accept () throws IOException  {    if (!isOpen())      throw new ClosedChannelException();    if (!serverSocket.isBound())      throw new NotYetBoundException();    boolean completed = false;        try      {        begin();        serverSocket.getPlainSocketImpl().setInChannelOperation(true);          // indicate that a channel is initiating the accept operation          // so that the socket ignores the fact that we might be in          // non-blocking mode.        NIOSocket socket = (NIOSocket) serverSocket.accept();        completed = true;        return socket.getChannel();      }    catch (SocketTimeoutException e)      {        return null;      }    finally      {        serverSocket.getPlainSocketImpl().setInChannelOperation(false);        end (completed);      }	}