How to get a file’s Media Type (MIME type)?

In Java 7 you can now just use Files.probeContentType(path).

Leave a Comment