Here you can find the source of finishConnect(SocketChannel socketChannel)
public static boolean finishConnect(SocketChannel socketChannel)
//package com.java2s; //License from project: Open Source License import java.nio.channels.SocketChannel; public class Main { public static boolean finishConnect(SocketChannel socketChannel) { boolean result = false; try {/*from ww w . java 2 s . c o m*/ if (socketChannel != null) { result = socketChannel.finishConnect(); } } catch (Exception ex) { // ex.printStackTrace(); } return result; } }