I want to write a method that receives the data to create a file, e.g.,
public File createFile(String fileName, String mimeType, byte[] contents)
In that method, how can I check that the value of mimeType
is acceptable? JDK 7 javax.activation.MimeType
class and Apache Tika do not seem to provide such a check method or any list of known mime types.
Thanks in advance for any clue.