code: public static String getUrlExtension(String url) {
          String extension = MimeTypeMap.getFileExtensionFromUrl(url);
          return TextUtils.isEmpty(extension) ? "" : extension;
      }
docs: Get he extension by url.
  
  @param url url.
  
  @return extension name.