Class MediaTypeUtil
- java.lang.Object
-
- coza.opencollab.epub.creator.util.MediaTypeUtil
-
public class MediaTypeUtil extends Object
Used to map file extensions to Mime types from a properties file- Author:
- OpenCollab
-
-
Constructor Summary
Constructors Constructor Description MediaTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getMediaTypeFromExt(String ext)
Returns the correct media type for a specific file extensionstatic String
getMediaTypeFromFilename(String fileName)
Returns the correct media type for a specific file namestatic void
setMediaTypeMap(Map<String,String> aMediaTypeMap)
Allows you to override the media type map
-
-
-
Method Detail
-
getMediaTypeFromExt
public static String getMediaTypeFromExt(String ext)
Returns the correct media type for a specific file extension- Parameters:
ext
- the file extension- Returns:
- the mime type
-
getMediaTypeFromFilename
public static String getMediaTypeFromFilename(String fileName)
Returns the correct media type for a specific file name- Parameters:
fileName
- the full filename- Returns:
- the mime type
-
-