The document says
"Stream is not buffered"
This is because Files.newInputStream (Paths) supports non-blocking IO.
You can try in debug mode, you can open a non-blocking input stream and at the same time change the file, but if you use FileInputStream, you cannot do such things.
FileInputStream will require a "write lock" file, so it can accumulate the contents of the file, increase read speed.
But ChannelInputStream cannot. It must ensure that it reads the "current" contents of the file.
Above my experience, I did not check every point in the Java document.
source share