2

Is there a standard reference that I can use to get standard mime type descriptions within Java without having an internet connection?

I could create my own reference but then I would need to maintain it.

NOTE I am after the description when I already have the mime type, I'm not trying to find the mime type for a file.

e.g. If I have application/xml I want to find the friendly name, i.e. XML Document.

I repeat, the linked question has nothing to do with this question besides the fact that it relates to mime types, read this properly and reopen!

Brett Ryan
  • 26,937
  • 30
  • 128
  • 163
  • I think [this might be what you are looking for][1]... [1]: http://stackoverflow.com/questions/51438/getting-a-files-mime-type-in-java – CodeChimp May 31 '13 at 02:50
  • No, that's not what I'm after, I'm after finding the mime-type description if I already have the mime type. i.e. "application/xml" should return "XML" or similar. – Brett Ryan May 31 '13 at 05:25
  • 2
    I wish people voting to close would read the question properly, the linked question is NOT the same, the only similarity is that it relates to mime types. Please reopen! – Brett Ryan May 31 '13 at 19:01

1 Answers1

2

As "friendly name" isn't standardized that's a bit tricky - it's subjective. Two candidates:

Obviously you'd have to parse HTML with both if you want to process that automatically. If I didn't totally misinterpret your requirements you could easily turn the 2nd resource into a simple properties file for offline usage.

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
  • That's what I'm after, I was hoping for an existing library to use to I didn't have to maintain. I do require offline use so will create my own reference. The reason I asked is there are many applications that do show mime type descriptions so thought there may be something existing. – Brett Ryan Jun 01 '13 at 08:20