FileContext provides an implementation of the Context object that provides a direct mapping from a request URI as defined in RFC 2616 to an OS specific target. This uses a File object to define the mapping for the request URI paths. Using a File object allows the FileContext to be easily used with both DOS and UNIX systems. This Indexer implementation uses an MIME database to obtain mappings for the getContentType method. The file used is acquired from the class path as a mapping from file extension to MIME type. This file can be modified if any additional types are required. However it is more advisable to simple extend this object and override the content type method.
@author Niall Gallagher
@see org.simpleframework.http.resource.FileIndexer
| |