public class MediaTypeFactory extends Object
MediaType
objects
from Resource
handles or filenames.
This implementation is based on the Java Activation Framework, sharing the MIME type definitions with Spring's JavaMail support. However, JAF is an implementation detail and not leaking out.
Constructor and Description |
---|
MediaTypeFactory() |
Modifier and Type | Method and Description |
---|---|
static MediaType |
getMediaType(Resource resource)
Determine a media type for the given resource, if possible.
|
static MediaType |
getMediaType(String filename)
Determine a media type for the given file name, if possible.
|