@Override
public Iterator<URL> getEmbeddedResourceURLs(String userAgent, byte[] data,
final URL baseUrl, String encoding)
throws LinkExtractorParseException {
try {
final String cssContent = new String(data, encoding);
final Charset charset = Charset.forName(encoding);
final Triple<String, URL, Charset> triple = ImmutableTriple.of(
cssContent, baseUrl, charset);
final URLCollection urlCollection = orDefault(CSS_URL_CACHE.get(triple), EMPTY_URL_COLLECTION);
if (LOG.isDebugEnabled()) {
LOG.debug("Parsed:" + baseUrl + ", got:" + StringUtils.join(urlCollection, ","));
}
return urlCollection.iterator();
} catch (Exception e) {
throw new LinkExtractorParseException(e);
}
}