There are tons of ways to get the Mime Type from a given InputStream or File.
But given a MimeType or (in HTTP terms: content type) how do I get a list of file extensions.
Java’s activation library has
MimetypesFileTypeMap but that goes File Ext -> Mime Type. I need Mime Type -> File Ext.
It seems like I would have to copy the pseudo private code that is in com.sun.activation to load up the mime type mappings.
I ended up using the Java Mimeutil library which comes with mime-types.properties file that you can load.