public String getMimeType ( final String name ) { String mimeType = null ; if ( name != null && name . length ( ) > 0 && name . contains ( "." ) ) { final String [ ] segments = name . split ( "\\." ) ; mimeType = mimeMappings . get ( segments [ segments . length - 1 ] ) ; } if ( mimeType == null ) { mimeType = httpContext . getMimeType ( name ) ; } return mimeType ; }
Find the mime type in the mime mappings . If not found delegate to wrapped http context .