title: Using Guava 19.0, is there a way to map a file extension to a MediaType?
body: <p>I have a full file path and would like to determine the MediaType (Google's Guava 19.0) it corresponds to. I thought there would be a built in function in MediaType to accomplish this but I don't think so after experimenting and reading the MediaType API.</p>
  
  <p>I know I can accomplish this by writing a giant switch to return a MediaType based on the file extension but I'd rather not do that if I don't have to. </p>
  
  <p>Is there an easy way to accomplish this or is writing a switch my only option?
  Thanks - Much Appreciated!</p>