code: public static String getFileExt(String fileName) {
          int dotPos = fileName.lastIndexOf('.');
          if (dotPos != -1 && dotPos != fileName.length() - 1) {
              return fileName.substring(dotPos);
          } else {
              return null;
          }
      }
docs: Simply returns file extension from the file path
  
  @param fileName
  @return