Class MimeTypesConfig

  • All Implemented Interfaces:

    
    public final class MimeTypesConfig
    
                        

    Configures static files Mime Types based on file extensions.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Map<String, String> getMapping()
      final Unit add(ContentType contentType) Adds a known content type to this configuration.
      final Unit add(ContentType contentType, String extensions) Adds a MimeType for custom file extensions.
      final Unit add(String mimeType, String extensions) Adds a MimeType for custom file extensions.
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MimeTypesConfig

        MimeTypesConfig()
    • Method Detail

      • add

         final Unit add(ContentType contentType)

        Adds a known content type to this configuration.

        Parameters:
        contentType - the content type to add
      • add

         final Unit add(ContentType contentType, String extensions)

        Adds a MimeType for custom file extensions.

        Parameters:
        contentType - the content type to add
        extensions - the extensions to use the given content type
      • add

         final Unit add(String mimeType, String extensions)

        Adds a MimeType for custom file extensions.

        Parameters:
        mimeType - the mime type to add
        extensions - the extensions to use the given mime type