aspose file tools*
The moose likes I/O and Streams and the fly likes How to get File extension? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to get File extension?" Watch "How to get File extension?" New topic
Author

How to get File extension?

ksp shenoy
Greenhorn

Joined: Jun 20, 2004
Posts: 4
Hi all,

I need to determine the extension (or MIME type...) of a file in JAVA..How can I do this...?

Thanks
KSPShenoy
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Getting the extension is easy.


MIME type is a bit more complex. The only place I've seen it used is in the JavaBeans Activation Framework which, given a data source, will use the MIME type to find applications which can handle that data. It's used in the JavaMail framework.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: How to get File extension?