Package dk.gtz.graphedit.serialization
Class FilesMimeTypeChecker
java.lang.Object
dk.gtz.graphedit.serialization.FilesMimeTypeChecker
- All Implemented Interfaces:
IMimeTypeChecker
MIME type checker implementation using the
Files
's implementation-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMimeType
(String filePath) Get the MIME type of some file path string.getMimeType
(Path path) Get the MIME type of some file path.
-
Constructor Details
-
FilesMimeTypeChecker
public FilesMimeTypeChecker()Construct a new instance
-
-
Method Details
-
getMimeType
Description copied from interface:IMimeTypeChecker
Get the MIME type of some file path.- Specified by:
getMimeType
in interfaceIMimeTypeChecker
- Parameters:
path
- a file path- Returns:
- MIME type string.
null
if the mime type is not recognized - Throws:
IOException
- if the path does not point to a proper file
-
getMimeType
Description copied from interface:IMimeTypeChecker
Get the MIME type of some file path string.- Specified by:
getMimeType
in interfaceIMimeTypeChecker
- Parameters:
filePath
- a file path string- Returns:
- MIME type string.
null
if the mime type is not recognized - Throws:
IOException
- if the path does not point to a proper file
-