public class DefaultParseFilter extends ParseFilter
ParseFilter
that is default for
spidering process. Its filter rules are the following:
number of
bytes
, otherwise it's considered a binary resource.
ParseFilter.FilterResult
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RESPONSE_BODY_SIZE
Deprecated.
(2.7.0) No longer in use, replaced by
SpiderParam.getMaxParseSizeBytes() . |
log
Constructor and Description |
---|
DefaultParseFilter()
Deprecated.
(2.7.0) Replaced by
DefaultParseFilter(SpiderParam, ResourceBundle) . |
DefaultParseFilter(SpiderParam params,
ResourceBundle resourceBundle)
Constructs a
DefaultParseFilter with the given configurations and resource bundle. |
Modifier and Type | Method and Description |
---|---|
ParseFilter.FilterResult |
filtered(HttpMessage responseMessage)
Tells whether or not the given resource is filtered.
|
getLogger, isFiltered
@Deprecated public static final int MAX_RESPONSE_BODY_SIZE
SpiderParam.getMaxParseSizeBytes()
.@Deprecated public DefaultParseFilter()
DefaultParseFilter(SpiderParam, ResourceBundle)
.DefaultParseFilter
with default configurations.public DefaultParseFilter(SpiderParam params, ResourceBundle resourceBundle)
DefaultParseFilter
with the given configurations and resource bundle.
The resource bundle is used to obtain the (internationalised) reasons of why the message was filtered.
params
- the spider configurationsresourceBundle
- the resource bundle to obtain the internationalised reasons.IllegalArgumentException
- if any of the given parameters is null
.SpiderParam.getMaxParseSizeBytes()
public ParseFilter.FilterResult filtered(HttpMessage responseMessage)
ParseFilter
Default is not filtered.
filtered
in class ParseFilter
responseMessage
- the HTTP message containing the response to be or not parsed.null
.