- All Known Implementing Classes:
GenericMediaTypeService
public interface MediaTypeService
A media type service provides methods to determine a media type based on a file name, a file extension, a path or a URI.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiongetForExtension
(String extension) Determines the media type of the specified file extension.getForFilename
(String filename) Determines the media type of the specified file name.getForPath
(Path path) Determines the media type of the specified path.Determines the media type of the specified path.
-
Method Details
-
getForExtension
Determines the media type of the specified file extension.
- Parameters:
extension
- a file extension- Returns:
- a media type or null if no known media type has been found for the specified file extension
-
getForFilename
Determines the media type of the specified file name.
- Parameters:
filename
- a file name- Returns:
- a media type or null if no known media type has been found for the specified file name
-
getForPath
Determines the media type of the specified path.
- Parameters:
path
- a path- Returns:
- a media type or null if no known media type has been found for the specified path
-
getForUri
Determines the media type of the specified path.
- Parameters:
uri
- a URI- Returns:
- a media type or null if no known media type has been found for the specified URI
-