use of eu.medsea.mimeutil.MimeUtil2 in project gerrit by GerritCodeReview.
the class MimeUtil2Module method provideMimeUtil2.
@Provides
@Singleton
MimeUtil2 provideMimeUtil2() {
MimeUtil2 m = new MimeUtil2();
m.registerMimeDetector(ExtensionMimeDetector.class.getName());
m.registerMimeDetector(MagicMimeMimeDetector.class.getName());
if (HostPlatform.isWin32()) {
m.registerMimeDetector("eu.medsea.mimeutil.detector.WindowsRegistryMimeDetector");
}
m.registerMimeDetector(DefaultFileExtensionRegistry.class.getName());
return m;
}
Aggregations