code: protected static String trimFileExtension(String fileName) {
  		if (fileName.lastIndexOf('.') == -1) {
  			return fileName;
  		}
  		return fileName.substring(0, fileName.lastIndexOf('.'));
  	}
docs: Remove the file extension.
  
  @param fileName the file name.
  @return the file name without the extension.