Here you can find the source of setNonBlockingFD(Channel c, boolean blocking)
public static void setNonBlockingFD(Channel c, boolean blocking) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.channels.Channel; import java.nio.channels.SelectableChannel; public class Main { public static void setNonBlockingFD(Channel c, boolean blocking) throws IOException { if (c instanceof SelectableChannel) { ((SelectableChannel) c).configureBlocking(blocking); }/* w w w .j a v a 2 s . c o m*/ } }