This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 8843
    
    7

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?
 
Similar Threads
Reading a file
tar files extraction
checking file extension
checksum
How to open a file with extension .rar