Class DefaultMimeTypeManager

java.lang.Object
cloud.piranha.core.impl.DefaultMimeTypeManager
All Implemented Interfaces:
MimeTypeManager

public class DefaultMimeTypeManager extends Object implements MimeTypeManager
The default MimeTypeManager implementation.
Author:
Manfred Riem ([email protected])
  • Constructor Details

    • DefaultMimeTypeManager

      public DefaultMimeTypeManager()
  • Method Details

    • addMimeType

      public void addMimeType(String extension, String mimeType)
      Description copied from interface: MimeTypeManager
      Add the mime type.
      Specified by:
      addMimeType in interface MimeTypeManager
      Parameters:
      extension - the extension (without the dot).
      mimeType - the mime type to return.
    • getMimeType

      public String getMimeType(String filename)
      Description copied from interface: MimeTypeManager
      Get the mime type.
      Specified by:
      getMimeType in interface MimeTypeManager
      Parameters:
      filename - the filename.
      Returns:
      the mime type or null if not found.