This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get File extension?  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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

Thanks
KSPShenoy
 
Bartender
Posts: 9481
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!