This method should be check if a file is MIME type. To achieve this goal I am using method probeContentType().
However maybe is another way to decide same question. Whic
Another alternative is to Use URLConnection.guessContentTypeFromName(String fileName) if you cannot use Java 7.
Note that if the content type cannot be guessed, the method will return null.