Package ucar.nc2.dt.ugrid.utils
Class AsaMemoryUtils.Convert
java.lang.Object
ucar.nc2.dt.ugrid.utils.AsaMemoryUtils.Convert
- Enclosing class:
- AsaMemoryUtils
a static class used in converting between bytes, megabytes, and gigabytes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublebytesToGigabytes(long bytes) Converts the specifiedlongvalue from bytes to gigabytesstatic doublebytesToMegabytes(long bytes) Converts the specifiedlongvalue from bytes to megabytesstatic doublegigabytesToBytes(double gigabytes) Converts the specifieddoublevalue from gigabytes to bytesstatic doublegigabytesToMegabytes(double gigabytes) Converts the specifieddoublevalue from gigabytes to megabytesstatic doublemegabytesToBytes(double megabytes) Converts the specifieddoublevalue from megabytes to bytesstatic doublemegabytesToGigabytes(double megabytes) Converts the specifieddoublevalue from megabytes to gigabytes
-
Constructor Details
-
Convert
public Convert()
-
-
Method Details
-
bytesToMegabytes
public static double bytesToMegabytes(long bytes) Converts the specifiedlongvalue from bytes to megabytes- Parameters:
bytes- alongvalue- Returns:
- the number of megabytes in
bytes
-
megabytesToBytes
public static double megabytesToBytes(double megabytes) Converts the specifieddoublevalue from megabytes to bytes- Parameters:
megabytes- adoublevalue- Returns:
- the number of bytes in
megabytes
-
bytesToGigabytes
public static double bytesToGigabytes(long bytes) Converts the specifiedlongvalue from bytes to gigabytes- Parameters:
bytes- alongvalue- Returns:
- the number of gigabytes in
bytes
-
gigabytesToBytes
public static double gigabytesToBytes(double gigabytes) Converts the specifieddoublevalue from gigabytes to bytes- Parameters:
gigabytes- adoublevalue- Returns:
- the number of bytes in
gigabytes
-
megabytesToGigabytes
public static double megabytesToGigabytes(double megabytes) Converts the specifieddoublevalue from megabytes to gigabytes- Parameters:
megabytes- adoublevalue- Returns:
- the number of gigabytes in
megabytes
-
gigabytesToMegabytes
public static double gigabytesToMegabytes(double gigabytes) Converts the specifieddoublevalue from gigabytes to megabytes- Parameters:
gigabytes- adoublevalue- Returns:
- the number of megabytes in
gigabytes
-