protected static String guessType(File file){
  String name=file.getName();
  String suffix=name.substring(name.lastIndexOf(".") + 1);
  return mimeMap.get(suffix.toLowerCase(Locale.ROOT));
}

protected static String guessType ( File file ) { String name = file . getName ( ) ; String suffix = name . substring ( name . lastIndexOf ( "." ) + 1 ) ; return mimeMap . get ( suffix . toLowerCase ( Locale . ROOT ) ) ; }
guesses the type of a file , based on file name suffix
