samedi 28 février 2015

Jersey: Set up response content-type based on file extension or InputStream?

I am using Jersey to serve a bunch of media-type files from resource folder inside a Jar file. I have the file URL returned by getClassLoader().getResource() and the InputStream returned by getClassLoader().getResourceAsStream(), is there a way for Jersey to detect the content-type for this file?


Aucun commentaire:

Enregistrer un commentaire