How can the block size of a file store be portably obtained in Java 7?

时光总嘲笑我的痴心妄想 提交于 2019-12-07 07:29:07

问题


I've looked at java.nio.file.attribute.Attributes and java.nio.file.FileStore, but couldn't find a way to discover the block-size of a disk-file.


回答1:


Here is an article on buffer size vs I/O throughput. Synopsis: nio handles all of that for you. This SO post concludes you should use a power of 2.



来源:https://stackoverflow.com/questions/3892186/how-can-the-block-size-of-a-file-store-be-portably-obtained-in-java-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!