*/
public class Util {
- public static double toMb(long bytes) {
- return (double) bytes / 1048576.0;
+ public static final String NL = String.format("%n");
+
+ public static long toMb(long numBytes) {
+ return (numBytes + (512 * 1024)) / (1024 * 1024);
+ }
+
+ public static long toKb(long numBytes) {
+ return (numBytes + 512) / 1024;
}
}
\ No newline at end of file