Class UnitUtils


  • public final class UnitUtils
    extends Object
    Utility methods for working with units.
    Author:
    Barry DeZonia, Curtis Rueden
    • Method Detail

      • getAbbreviatedByteLabel

        public static String getAbbreviatedByteLabel​(double totBytes)
        Returns:
        A properly formatted String representation of the given bytes, in the default Locale for this JVM.
      • format

        public static String format​(double power)
        Returns:
        Format result with 0 decimal places for bytes, or 1 for larger values