Package cloud.piranha.webapp.impl
Class DefaultMimeTypeManager
- java.lang.Object
-
- cloud.piranha.webapp.impl.DefaultMimeTypeManager
-
- All Implemented Interfaces:
MimeTypeManager
public class DefaultMimeTypeManager extends Object implements MimeTypeManager
The default MimeTypeManager.- Author:
- Manfred Riem ([email protected])
-
-
Constructor Summary
Constructors Constructor Description DefaultMimeTypeManager()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMimeType(String extension, String mimeType)
Add the mime type.String
getMimeType(String filename)
Get the mime type.
-
-
-
Method Detail
-
addMimeType
public void addMimeType(String extension, String mimeType)
Add the mime type.- Specified by:
addMimeType
in interfaceMimeTypeManager
- Parameters:
extension
- the extension (without the dot).mimeType
- the mime type to return.
-
getMimeType
public String getMimeType(String filename)
Get the mime type.- Specified by:
getMimeType
in interfaceMimeTypeManager
- Parameters:
filename
- the filename.- Returns:
- the mime type, or null if not found.
-
-