public class HeaderMatcher
extends java.lang.Object
Matches headers.
Usage:
read(Reader) contentmatches(Pattern) against filtered contentNote: use only from a single thread.
| Modifier and Type | Field and Description |
|---|---|
private FilteringSequenceFactory |
factory |
private HeaderBean[] |
headers |
private int |
lines |
private java.lang.CharSequence |
read |
| Constructor and Description |
|---|
HeaderMatcher(CharFilter filter,
int capacity) |
HeaderMatcher(CharFilter filter,
int capacity,
HeaderBean[] headers) |
| Modifier and Type | Method and Description |
|---|---|
int |
lines()
Number of lines read.
|
boolean |
matches(java.util.regex.Pattern pattern)
Seeks a match in the last headers read.
|
void |
read(java.io.Reader reader) |
private final FilteringSequenceFactory factory
private final HeaderBean[] headers
private java.lang.CharSequence read
private int lines
public HeaderMatcher(CharFilter filter, int capacity)
public HeaderMatcher(CharFilter filter, int capacity, HeaderBean[] headers)
public void read(java.io.Reader reader)
throws java.io.IOException
java.io.IOExceptionpublic boolean matches(java.util.regex.Pattern pattern)
Seeks a match in the last headers read.
Note that this pattern must not contain filtered characters.
pattern - Pattern to matchread(Reader) has not been
calledpublic int lines()