Java's FileChannel supports writing from an array of buffers to a channel in a gathering write with int write(ByteBuffer[] src).
It does not however support an equivalent of the write with offset method write(ByteBuffer src, long position). There seems to be no way to do a gathering write to a specified offset without locking the channel, changing the position, writing to that position, then unlocking the channel.
It appears that ultimately java uses the writev system call to perform gathering writes. The pwritev command appears to do exactly what one would want and expect it to do.
Is there any good reason why there is no gathering write method with offset? Are there any libraries that implement this?