code: public static Optional<String> getFileType(final String aUrl) {
      if (aUrl != null) {
        int index = aUrl.lastIndexOf('.');
        if (index > 0) {
          return Optional.of(aUrl.substring(index + 1));
        }
      }
  
      return Optional.empty();
    }
docs: returns the file type of the url.
  
  @param aUrl the url
  @return the type of the file