Package ratpack.file

Interface MimeTypes


  • public interface MimeTypes
    A registry for mime types. Every exchange has an instance of this type available via the service. The default implementation uses the MimetypesFileTypeMap class.
    • Method Detail

      • getContentType

        java.lang.String getContentType​(java.lang.String name)
        Calculate the mime type for the given file.
        Parameters:
        name - The file name to calculate the mime type for.
        Returns:
        The mime type for the file name.