code: private static String getFileExtension(final String filename) {
  
  		String extension = "";
  		int i = filename.lastIndexOf('.');
  		int p = Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\'));
  		if (i > p)
  			extension = filename.substring(i+1);
  
  		return extension;
  	}
docs: Get the file name extension from its name.
  @param filename the filename.
  @return the file name extension.