Is there a Java enum for filesize units that’s equivalent to java.util.concurrent.TimeUnit?

Apache commons provides constants in the FileUtils class, like

  • FileUtils.ONE_MB
  • FileUtils.ONE_GB

source : https://commons.apache.org/proper/commons-io/javadocs/api-2.2/org/apache/commons/io/FileUtils.html

Their definition of a KB is based on 1024 bytes, (a MB is KB², and so long).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)