com.norconex.commons.lang.io
Class RegexInputStreamFilter
java.lang.Object
com.norconex.commons.lang.io.RegexInputStreamFilter
- All Implemented Interfaces:
- IInputStreamFilter
public class RegexInputStreamFilter
- extends Object
- implements IInputStreamFilter
Filters lines of text read from an InputStream decorated with
FilteredInputStream
, based on a given regular expression.
- Author:
- Pascal Essiembre
Method Summary |
boolean |
accept(String string)
Whether a line is "accepted" or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexInputStreamFilter
public RegexInputStreamFilter(String regex)
RegexInputStreamFilter
public RegexInputStreamFilter(Pattern pattern)
accept
public boolean accept(String string)
- Description copied from interface:
IInputStreamFilter
- Whether a line is "accepted" or not. An accepted line is being
returned when read.
- Specified by:
accept
in interface IInputStreamFilter
- Parameters:
string
- line being read
- Returns:
true
if line is accepted
Copyright © 2008-2013 Norconex Inc.. All Rights Reserved.