public class CssDataUriPreProcessor extends AbstractCssUrlRewritingProcessor
CssUrlRewritingProcessor, otherwise the url's won't be
replaced. For more details, @see DataUri Scheme on
Wikipedia| Constructor and Description |
|---|
CssDataUriPreProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected DataUriGenerator |
getDataUriGenerator() |
protected boolean |
isReplaceAccepted(String dataUri)
Similar to
isReplaceAccepted(String), but decides whether the computed dataUri
should replace the image url. |
protected boolean |
isReplaceNeeded(String url)
Check if url must be replaced or not.
|
protected String |
replaceImageUrl(String cssUri,
String imageUrl)
Replace provided url with the new url if needed.
|
getUrlPrefix, isImportAware, newCssUrlInspector, onProcessCompleted, onUrlReplaced, process, process, replaceDeclarationpublic static final String ALIAS
protected String replaceImageUrl(String cssUri, String imageUrl)
replaceImageUrl in class AbstractCssUrlRewritingProcessorimageUrl - to replace.cssUri - Uri of the parsed css.protected boolean isReplaceAccepted(String dataUri)
isReplaceAccepted(String), but decides whether the computed dataUri
should replace the image url. It is useful when you want to limit the dataUri size. By default the size of dataUri
is limited to 32KB (because IE8 has a 32KB limitation).dataUri - base64 encoded stream.protected boolean isReplaceNeeded(String url)
isReplaceNeeded in class AbstractCssUrlRewritingProcessorurl - to check.protected DataUriGenerator getDataUriGenerator()
Copyright © 2008-2014. All Rights Reserved.