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