You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
341 B
19 lines
341 B
package cx.sfy.TheBridge.utils;
|
|
|
|
public class MathUtils {
|
|
|
|
public static int toMegaByte(long bytes) {
|
|
return (int) (bytes / 1048576);
|
|
}
|
|
|
|
public static boolean isInt(String str) {
|
|
try {
|
|
int d = Integer.parseInt(str);
|
|
d = d + 1;
|
|
} catch (NumberFormatException nfe) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
}
|