My query is on what is the best way to read / write to a linux Pipe in Java? I already am using the java.io.RandomAccessFile like
RandomAccessFile file = new RandomAccessFile("/dev/zap/16", "rw");
and then passing it to worker thread which reads it after every 2ms as
byte[] buffer = new byte[16];
file.read(buffer);
It does read it from Pipe, but I suspect that some bytes are overwritten. Do you know how linux (ubuntu) handles the buffer for pipe's?