code: private static String getFileExtension(Resource file) {
  	String name = file.getName();
  	String[] arr;
  	try {
  	    arr = ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(name, '.'));
  	}
  	catch (PageException e) {
  	    arr = null;
  	}
  	if (arr.length < 2) return "";
  
  	return arr[arr.length - 1];
      }
docs: get file extension of a file object
  
  @param file file object
  @return extension