+
This commit is contained in:
@ -100,8 +100,7 @@ public class Tools {
|
||||
try {
|
||||
InetAddress ipAddr = InetAddress.getByName("google.com");
|
||||
//InetAddress ipAddr = InetAddress.getByName("geovizor.com");
|
||||
//You can replace it with your name
|
||||
return !ipAddr.equals("");
|
||||
return ipAddr.isReachable(5000);
|
||||
} catch (Exception ex) {
|
||||
return false;
|
||||
}
|
||||
@ -1019,10 +1018,10 @@ public class Tools {
|
||||
if((str.charAt(i)=='-' && (val.length()==0 || val.charAt(0)!='-')) || str.charAt(i)=='0' || str.charAt(i)=='1' || str.charAt(i)=='2' || str.charAt(i)=='3' || str.charAt(i)=='4' || str.charAt(i)=='5' || str.charAt(i)=='6' || str.charAt(i)=='7' || str.charAt(i)=='8' || str.charAt(i)=='9')
|
||||
val.append(str.charAt(i));
|
||||
}
|
||||
if(val.toString().equals("")) return 0;
|
||||
if(val.toString().isEmpty()) return 0;
|
||||
return Integer.parseInt(val.toString());
|
||||
}
|
||||
if(str.equals("")) return 0;
|
||||
if(str.isEmpty()) return 0;
|
||||
return Integer.parseInt(str);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user