/** * Get the content type corresponding to an extension. * @param extension the extension to search the content type for * @return the content type */ public static Optional<String> getContentTypeByExtension(String extension) { return Optional.ofNullable(DEFAULT.get(extension)); }