Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any code available to get mime-type for file?

843830May 15 2003 — edited May 17 2003
Hi,

at this link http://www.utoronto.ca/ian/books/html4ed/appb/mimetype.html you can find a huge listing of content-types for files. What I'd like to know is, if there's any code available for getting the right mime-type for a given file-extension. E.g given a filename "Document.doc" returns mime-type "application/msword".

Thanks in advance,

Tom
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2003
Added on May 15 2003
1 comment
127 views