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