class MediaTypes {

    public static Optional<String> detectExtensionType(String fileSuffix) {
        return CACHE.computeIfAbsent(fileSuffix, it ->
                DETECTORS.stream()
                        .map(mtd -> mtd.detectExtensionType(fileSuffix))
                        .flatMap(Optional::stream)
                        .findFirst());
    }

    private  MediaTypes();

}