Class MimeMapping

java.lang.Object
io.vertx.core.http.MimeMapping

public final class MimeMapping extends Object
We do our own mapping since support for mime mapping in Java is platform dependent and doesn't seem to work very well
Author:
Tim Fox
  • Constructor Details

    • MimeMapping

      public MimeMapping()
  • Method Details

    • 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) or null
    • 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