public static boolean hasExtension(String extension){
  if (extension == null || extension.isEmpty()) {
    return false;
  }
  return extensionToMimeTypeMap.containsKey(extension);
}

public static boolean hasExtension ( String extension ) { if ( extension == null || extension . isEmpty ( ) ) { return false ; } return extensionToMimeTypeMap . containsKey ( extension ) ; }
returns true if the given extension has a registered mime type .
