/** * Returns the MIME-type of the file using its name. If the MIME-type cannot be determined, a <code>null</code> is returned. * * @param file the file; may be <code>null</code>. * @return The MIME-type of the file, or optionally <code>null</code> if the MIME-type could not be determined. */ public String mimeTypeOf( File file ) { if (file == null) return null; return mimeTypeOf(file.getName()); } }