public static String guessMimeTypeFromExtension(String extension){
  if (extension == null || extension.isEmpty()) {
    return null;
  }
  return extensionToMimeTypeMap.get(extension);
}

public static String guessMimeTypeFromExtension ( String extension ) { if ( extension == null || extension . isEmpty ( ) ) { return null ; } return extensionToMimeTypeMap . get ( extension ) ; }
returns the mime type for the given extension .
