public interface Filter
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterAppend(StringBuilder buffer)
Invoked when the input string has just been appended to the input buffer.
|
String |
beforeAppend(String string,
StringBuilder buffer)
Invoked when a string read from the input is about to be appended to the input buffer.
|
boolean |
isEnabled()
Indicates if the filter is enabled or disabled.
|
void |
setEnabled(boolean enabled)
Enables or disables the filter for the input.
|
String beforeAppend(String string, StringBuilder buffer)
string - a chunk of input data read from the input stream. Can not be null.
If the filter
works in the Filters.chain(Filter...), then the string is the result
of preceding filterbuffer - the reference to the input buffer. Can be used to modify the entire buffer
contents.null to ignore all the
consequent filters in
the filter chain.boolean afterAppend(StringBuilder buffer)
buffer - the reference to the input buffer. Can be used to modify the entire buffer
contents.true if all the
consequent filters must not be executed, or false otherwise.boolean isEnabled()
true if the filter is enabled, or false otherwise.void setEnabled(boolean enabled)
enabled - if true then the filter will be enabled, or false otherwise.Copyright © 2014–2018 Alexey Gavrilov and contributors. All rights reserved.