Package io.vertx.core.http
Class MimeMapping
- java.lang.Object
-
- io.vertx.core.http.MimeMapping
-
-
Constructor Summary
Constructors Constructor Description MimeMapping()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Map.Entry<String,String>>iterate()static StringmimeTypeForExtension(String ext)static StringmimeTypeForFilename(String filename)
-
-
-
Method Detail
-
iterate
public Iterator<Map.Entry<String,String>> iterate()
- Returns:
- an iterator over the known mime mappings
-
mimeTypeForExtension
public static String mimeTypeForExtension(String ext)
- Parameters:
ext- the file name extension in lower-case format- Returns:
- the matching mime type for a file extension (e.g.
.mkv) ornull
-
mimeTypeForFilename
public static String mimeTypeForFilename(String filename)
- Parameters:
filename- the file name, the filename extension is converted to the lower-case format before matching the mime mapping- Returns:
- the matching mime type for a file name or
null, the file extension is used for lookup
-
-