org.scijava.util
Class UnitUtils

java.lang.Object
  extended by org.scijava.util.UnitUtils

public final class UnitUtils
extends Object

Utility methods for working with units.

Author:
Barry DeZonia, Curtis Rueden

Method Summary
static String format(double power)
           
static String getAbbreviatedByteLabel(double totBytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2009–2015 SciJava. All rights reserved.