How do I get the file/mime type without sending a file via http method? I am handling uploads of files by raw socket connections, applet-applet, to put into a database however I need to store the mime type in the database as well so that the data can be sent again by normal http methods. So how do I do this without using javax.activation or other 3rd party classes. I can't use these as the applet is working within a browser, i.e. only support for java1.0 Hope you can give me some help on this.