Package org.apache.sis.internal.storage
Class StoreTypeDetector
java.lang.Object
java.nio.file.spi.FileTypeDetector
org.apache.sis.internal.storage.StoreTypeDetector
A
java.nio.file
service to be registered for probing content type.
The probeContentType(Path)
will be automatically invoked by
Files.probeContentType(Path)
.- Since:
- 0.4
- Version:
- 0.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprobeContentType
(Path path) Probes the given file by delegating toDataStores.probeContentType(Object)
.
-
Constructor Details
-
StoreTypeDetector
public StoreTypeDetector()Constructor forServiceLoader
.
-
-
Method Details
-
probeContentType
Probes the given file by delegating toDataStores.probeContentType(Object)
.- Specified by:
probeContentType
in classFileTypeDetector
- Parameters:
path
- the path to the file to probe.- Returns:
- the content type or
null
if the file type is not recognized. - Throws:
IOException
- if an I/O error occurs while reading the file.- See Also:
-