How-to articles, tricks, and solutions about MIME
How to get a file's Media Type (MIME type)?
To get the media type (also known as MIME type) of a file in Java, you can use the Files.probeContentType method of the java.nio.file.Files class.