Simple question: how can I get MIME type (or content type) of an InputStream, without saving file, for a file that a user is uploading to my servlet?
InputStream
You can check the Content-Type header field and have a look at the extension of the filename used. For everything else, you have to run more complex routines, like checking by Tikaetc.
Content-Type
Tika