Interface MediaTypePredictor
-
- All Known Implementing Classes:
DefaultMediaTypePredictor
public interface MediaTypePredictorAn interface which allows developers implement their own media type predictor.- Author:
- Imran M Yousuf (imran at smartitengineering.com), Paul Sandoz, Michal Gajdos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MediaTypegetMediaTypeFromFile(File file)Get the media type from a file name.MediaTypegetMediaTypeFromFileName(String fileName)Get the media type from a file name.
-
-
-
Method Detail
-
getMediaTypeFromFile
MediaType getMediaTypeFromFile(File file)
Get the media type from a file name.- Parameters:
file- the file from which to get theMediaType.- Returns:
- the
MediaTypefor the give file;null- if file is null; "application/octet-stream" if extension not recognized. - See Also:
DefaultMediaTypePredictor.CommonMediaTypes.getMediaTypeFromFileName(java.lang.String)
-
-