java 7中稀疏文件的含義是什么?

[英]What is the meaning of sparse file in java 7?

In java 7 OpenOption "SPARSE" Hints that a newly created file will be sparse. What does that mean?

在java 7中,OpenOption“SPARSE”提示新創建的文件將是稀疏的。那是什么意思?

1 个解决方案



A sparse file is one in which contiguous sections of the file that are all zeros may not be allocated disc blocks. It is a way of saving disk space if you intend to create a file that will have large "holes" in it. For more background, refer to this Wikipedia article -

稀疏文件是其中全部為零的文件的連續部分可能不被分配的磁盤塊。如果您打算創建一個包含大“漏洞”的文件,這是節省磁盤空間的一種方法。有關更多背景信息,請參閱此Wikipedia文章 -

As Joachim notes, many kinds of file system on many operating systems support sparse files, and have done for many years. Java 7 is simply making this functionality available for Java applications to use ... where available.

正如Joachim所指出的,許多操作系統上的多種文件系統都支持稀疏文件,並且已經做了很多年。 Java 7只是使這個功能可供Java應用程序使用......如果可用的話。



粤ICP备14056181号  © 2014-2020