public static boolean isValidIPAddress(String s) {
    	String[] nums = s.split("\\.");
    	if (4 != nums.length) return false; 
    	for (int i = 0; i < nums.length; i++) {
    		if (nums[i].startsWith("0") && nums[i].length() > 1) return false; 
    		int n = Integer.parseInt(nums[i]);
    		if (n > 255 || n < 0) return false;
    	}
    	return true;
    }