@Override public Type getMimeType() { return _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(_contentType)); }
@Override public Type getMimeType() { return _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(_contentType)); }
@Override public Type getMimeType() { return _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(_contentType)); }
_contentType = contentType == null ? null : new PreEncodedHttpField(HttpHeader.CONTENT_TYPE, contentType); _characterEncoding = _contentType == null ? null : MimeTypes.getCharsetFromContentType(contentType); _mimeType = _contentType == null ? null : MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(contentType));
CachedHttpContent(String pathInContext,Resource resource,CachedHttpContent gzipped) { _key=pathInContext; _resource=resource; String contentType = _mimeTypes.getMimeByExtension(_resource.toString()); _contentType=contentType==null?null:new PreEncodedHttpField(HttpHeader.CONTENT_TYPE,contentType); _characterEncoding = _contentType==null?null:MimeTypes.getCharsetFromContentType(contentType); _mimeType = _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(contentType)); boolean exists=resource.exists(); _lastModifiedValue=exists?resource.lastModified():-1L; _lastModified=_lastModifiedValue==-1?null :new PreEncodedHttpField(HttpHeader.LAST_MODIFIED,DateGenerator.formatDate(_lastModifiedValue)); _contentLengthValue=exists?(int)resource.length():0; _contentLength=new PreEncodedHttpField(HttpHeader.CONTENT_LENGTH,Long.toString(_contentLengthValue)); if (_cachedFiles.incrementAndGet()>_maxCachedFiles) shrinkCache(); _lastAccessed=System.currentTimeMillis(); _etag=ResourceCache.this._etags?new PreEncodedHttpField(HttpHeader.ETAG,resource.getWeakETag()):null; _gzipped=gzipped==null?null:new CachedGzipHttpContent(this,gzipped); }
if (_contentType != null) _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); HttpField field = HttpField.CONTENT_TYPE.get(_contentType); if (field!=null) if (_contentType != null) _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + ";charset=" + _characterEncoding; HttpField field = HttpField.CONTENT_TYPE.get(_contentType); if (field!=null)
if (_contentType != null) _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); HttpField field = HttpField.CONTENT_TYPE.get(_contentType); if (field!=null) if (_contentType != null) _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + ";charset=" + _characterEncoding; HttpField field = HttpField.CONTENT_TYPE.get(_contentType); if (field!=null)
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); if (_characterEncoding != null) _contentType = _contentType + ";charset=" + _characterEncoding;
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); if (_characterEncoding != null) _contentType = _contentType + ";charset=" + _characterEncoding;
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); _fields.put(HttpHeader.CONTENT_TYPE, _contentType); _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + ";charset=" + _characterEncoding; _fields.put(HttpHeader.CONTENT_TYPE, _contentType);
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); _fields.put(HttpHeader.CONTENT_TYPE, _contentType); _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + ";charset=" + _characterEncoding; _fields.put(HttpHeader.CONTENT_TYPE, _contentType);
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); _fields.put(HttpHeader.CONTENT_TYPE, _contentType); _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + ";charset=" + _characterEncoding; _fields.put(HttpHeader.CONTENT_TYPE, _contentType);
else ct=MimeTypes.getContentTypeWithoutCharset(ct); _aggregating=isMimeTypeBufferable(StringUtil.asciiToLowerCase(ct));
if (ct!=null) ct=MimeTypes.getContentTypeWithoutCharset(ct); if (!_factory.isMimeTypeGzipable(StringUtil.asciiToLowerCase(ct)))
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); _fields.put(HttpHeader.CONTENT_TYPE, _contentType); _contentType = MimeTypes.getContentTypeWithoutCharset(_contentType) + "; charset=" + _characterEncoding; _fields.put(HttpHeader.CONTENT_TYPE, _contentType);
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); if (_characterEncoding != null) _contentType = _contentType + "; charset=" + _characterEncoding;
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); if (_characterEncoding != null) _contentType = _contentType + ";charset=" + _characterEncoding;
_contentType = MimeTypes.getContentTypeWithoutCharset(_contentType); if (_characterEncoding != null) _contentType = _contentType + ";charset=" + _characterEncoding;
__explicitCharset.contains(_encodingFrom)) setContentType(MimeTypes.getContentTypeWithoutCharset(content.getContentTypeValue()));
if (mimeType!=null) mimeType = MimeTypes.getContentTypeWithoutCharset(mimeType); if (!isMimeTypeBufferable(mimeType))