No, FileChannel not covered by SelectableChannel .
Perhaps because not all OSs support it.
Windows does, and theoretically you can write a C ++ library for Windows and call it through JNI, but it is very difficult to integrate it with java.nio .
I would prefer the workflow to copy the contents of the file into the pipe and do non-blocking reads at the other end of the pipe.
finnw
source share