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


Win a copy of Java 8 in Action this week in the Java 8 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: 8715
    
    6

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get File extension?
 
Similar Threads
checking file extension
Reading a file
tar files extraction
How to open a file with extension .rar
checksum