File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/org/scijava/util Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3131
3232package org .scijava .util ;
3333
34- import java .util .Locale ;
3534
3635/**
3736 * Utility methods for working with units.
@@ -50,6 +49,10 @@ private UnitUtils() {
5049 // prevent instantiation of utility class
5150 }
5251
52+ /**
53+ * @return A properly formatted String representation of the given bytes, in
54+ * the default {@link java.util.Locale} for this JVM.
55+ */
5356 public static String getAbbreviatedByteLabel (final double totBytes ) {
5457 if (totBytes < 0 ) {
5558 throw new IllegalArgumentException ("Bytes must be non-negative" );
@@ -65,7 +68,7 @@ public static String getAbbreviatedByteLabel(final double totBytes) {
6568
6669 // format result with 0 decimal places for bytes, or 1 for larger values
6770 final String format = pow == 0 ? "%.0f%s" : "%.1f%s" ;
68- return String .format (Locale . US , format , value , BYTE_UNITS [pow ]);
71+ return String .format (format , value , BYTE_UNITS [pow ]);
6972 }
7073
7174}
You can’t perform that action at this time.
0 commit comments