Package com.cloudofficeprint
Class Mimetype
- java.lang.Object
-
- com.cloudofficeprint.Mimetype
-
public class Mimetype extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Mimetype()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getMimeType(java.lang.String extension)
As the tika library gives two warnings I decided to implement if manually for all the supported document formats (not a lot).
-
-
-
Method Detail
-
getMimeType
public static java.lang.String getMimeType(java.lang.String extension) throws java.lang.Exception
As the tika library gives two warnings I decided to implement if manually for all the supported document formats (not a lot). I didn't find any better option for the moment.- Parameters:
extension
- Extension of the file to find the mimetype.- Returns:
- Mimetype of the file.
- Throws:
java.lang.Exception
- If the file type is not supported (cannot find the mimetype).
-
-