org.apache.jmeter.protocol.http.parser

## Class CssParser

- java.lang.Object
- - org.apache.jmeter.protocol.http.parser.CssParser

All Implemented Interfaces:
  LinkExtractorParser

    public class CssParser
    extends Object
    implements LinkExtractorParser

CSS Parser used to extract from CSS files external urls

Since:
  3.0

### Constructor Summary

Constructors
Constructor and Description
`CssParser()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Iterator<URL>` `getEmbeddedResourceURLs(String userAgent, byte[] data, URL baseUrl, String encoding)` Get the URLs for all the resources that a browser would automatically download following the download of the content, that is: images, stylesheets, javascript files, applets, etc...
`boolean` `isReusable()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CssParser

    public CssParser()

### Method Detail

#### getEmbeddedResourceURLs

    public Iterator<URL> getEmbeddedResourceURLs(String userAgent,
                                                 byte[] data,
                                                 URL baseUrl,
                                                 String encoding)
                                          throws LinkExtractorParseException

Description copied from interface: `LinkExtractorParser`
Get the URLs for all the resources that a browser would automatically download following the download of the content, that is: images, stylesheets, javascript files, applets, etc...

URLs should not appear twice in the returned iterator.

Malformed URLs can be reported to the caller by having the Iterator return the corresponding RL String. Overall problems parsing the html should be reported by throwing an HTMLParseException.

Specified by:
  `getEmbeddedResourceURLs` in interface `LinkExtractorParser`
Parameters:
  `userAgent` - User Agent
  `data` - Response data
  `baseUrl` - Base URL from which the HTML code was obtained
  `encoding` - Charset
Returns:
  an Iterator for the resource URLs
Throws:
  `LinkExtractorParseException` - when extracting the links fails
See Also:
  `(java.lang.String, byte[], java.net.URL, java.lang.String)`

#### isReusable

    public boolean isReusable()

Specified by:
  `isReusable` in interface `LinkExtractorParser`