private void setContentTypeHeader ( HttpResponse response , File file ) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap ( ) ; response . setHeader ( HttpHeaders . Names . CONTENT_TYPE , mimeTypesMap . getContentType ( file . getPath ( ) ) ) ; }
Sets the content type header for the HTTP Response