java.lang.Object
cloud.piranha.webapp.impl.DefaultMimeTypeManager
- All Implemented Interfaces:
MimeTypeManager
public class DefaultMimeTypeManager extends java.lang.Object implements MimeTypeManager
The default MimeTypeManager.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
Constructors Constructor Description DefaultMimeTypeManager()
Constructor. -
Method Summary
Modifier and Type Method Description void
addMimeType(java.lang.String extension, java.lang.String mimeType)
Add the mime type.java.lang.String
getMimeType(java.lang.String filename)
Get the mime type.
-
Constructor Details
-
DefaultMimeTypeManager
public DefaultMimeTypeManager()Constructor.
-
-
Method Details
-
addMimeType
public void addMimeType(java.lang.String extension, java.lang.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 java.lang.String getMimeType(java.lang.String filename)Get the mime type.- Specified by:
getMimeType
in interfaceMimeTypeManager
- Parameters:
filename
- the filename.- Returns:
- the mime type, or null if not found.
-