I am looking to get accurate (i.e. the real size on disk and not the normal size that includes all the 0's) measurements of sparse files in Java.
In C++ on Windows one would use GetCompressedFileSize
. I have yet to come across how one would go about doing that in Java?
If there isn't a direct equivalent, how would I go about measuring the data within a sparse file, as opposed to the size including all of the zeros?
For clarification, I am look for this to run the sparse file measurements on both on Linux OS as well as Windows, however I don't mind coding two separate applications!