Possible Duplicate:
Format file size as MB, GB etc
Using NumberFormat, I would like to have my numbers formatted as scientific multipliers. In other words, I would like to have the following formatting:
- 1024 should be formatted as 1K
- 1048576 should be formatted as 1G
And obviously other numbers should be expressed using k, G, and other multiples.
How can I do that ? Or do I need some Java library ?
Maybe that? How to convert byte size into human readable format in java?