public static String getExtension(String s) {
		if (s==null) {
			return null;
		}
		if (s.equals("")) {
			return "";
		}
		int lastIndex = s.length()-1;
		boolean found = false;
		while (lastIndex>=1) {
			if (s.charAt(lastIndex)=='.') {
				found=true;
				break;
			}
			lastIndex--;
		}
		if (!found || lastIndex==s.length()-1) {
			return "";
		} else {
			return s.substring(lastIndex+1);
		}
	}