java.nio.file.Files.isReadable() slow on Windows 7

Zhong Yu zhong.j.yu at gmail.com
Thu May 10 20:09:08 PDT 2012


java.nio.file.Files.isReadable() seems to be really slow on Windows 7;
on my machine it takes 3ms per call (tested in a tight loop on the
same file). That means only 300 calls per second.

It's much faster to test readability by opening a file channel for
read then close it.

Any other workarounds?

Zhong Yu


More information about the nio-dev mailing list