java.lang.Object
nextapp.echoservlet.util.Extensions
- public class Extensions
- extends java.lang.Object
Determines ContentType based on file extensions.
|
Constructor Summary |
private |
Extensions()
Non-instantiable class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contentTypeMap
private static final java.util.Map contentTypeMap
- A PropertyMap mapping extensions to content types
Extensions
private Extensions()
- Non-instantiable class.
getExtensionContentType
public static ContentType getExtensionContentType(java.lang.String extension)
- Returns the content type associated with the specified extension.
If no content type is bound to the specified extension, null is
returned.
getFileNameContentType
public static ContentType getFileNameContentType(java.lang.String fileName)
- Returns the content type associated with the provided file name.
The file name is parsed and its extension is retrieved.