class MediaTypes {

    public static Optional<String> detectType(URL url) {
        return DETECTORS.stream()
                .map(mtd -> mtd.detectType(url))
                .flatMap(Optional::stream)
                .findFirst();
    }

    private  MediaTypes();

}