How do I create a human-readable file size?
Category: commons.io, viewed: 4670 time(s).
This example demonstrate how to create a human-readable file size using the FileUtils class of commons-io library. The byteCountToDisplaySize() method take the file size in bytes and return a human-readable display of the file size.
Here are the result of our program:
Name = jdk-6u7-linux-i586.bin size = 78482905 Display = 74 MB
Download Hundreds of Complimentary Industry Resources
Get hundreds of popular Industry magazines, white papers, webinars, podcasts, and more;
all available at no cost to you. With more than 600 complimentary offers, you'll find
plenty of titles to suit your professional interests and needs.
Click Here and Sign up today!


