Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Built-in storage unit conversions utilty in Java?

there doesn't seem to be an existing util class for converting a storage unit from one to another in Java, am I right? Or is there one actually I wasn't aware of?

What I was looking for is something like java.util.concurrent.TimeUnit utility. I can implement the equivalent for storage unit by myself, but just thought I would ask first before reinventing the wheel.

Thanks.

like image 391
His Avatar asked Aug 01 '26 00:08

His


1 Answers

Check out JSR-275. Depending on what you want to do, might be a bit of an overkill. Or you could take a look at Commons Monitoring. They deal with some storage units I think, but again, the library itself is probably too much when want just the class.

like image 107
aberrant80 Avatar answered Aug 03 '26 13:08

aberrant80



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!