Class 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 Detail

      • MimeMapping

        public MimeMapping()
    • Method Detail

      • mimeTypeForExtension

        public static String mimeTypeForExtension​(String ext)
        Parameters:
        ext - the file name extension
        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
        Returns:
        the matching mime type for a file name or null, the file extension is used for lookup