Java FileLock setNonBlockingFD(Channel c, boolean blocking)

Here you can find the source of setNonBlockingFD(Channel c, boolean blocking)

Description

set Non Blocking FD

License

Open Source License

Declaration

public static void setNonBlockingFD(Channel c, boolean blocking) throws IOException 

Method Source Code

//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*/
    }
}

Related

  1. openTcpSocket(boolean blocking)
  2. pauseForLock(File f, int frequency, int totalTime)
  3. releaseQuietly(FileLock lock)
  4. releaseQuietly(final FileLock lock)
  5. releaseSilent(FileLock fileLock)
  6. tryLock(File file)
  7. trylock(File file, boolean shared)
  8. tryLock(File location)
  9. unblockSocket(SelectableChannel... channels)