This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get File extension?

 
ksp shenoy
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
 
Joe Ess
Bartender
Posts: 9320
10
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic