Package com.norconex.commons.lang.io

# Class RegexInputStreamFilter

java.lang.Object
com.norconex.commons.lang.io.RegexInputStreamFilter

All Implemented Interfaces:
  `Predicate<String>`

public class RegexInputStreamFilter extends Object implements Predicate<String>
Filters lines of text read from an InputStream decorated with `FilteredInputStream`, based on a given regular expression.

See Also:
  - `Pattern`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RegexInputStreamFilter(String regex)`
  Constructor.
  `RegexInputStreamFilter(Pattern pattern)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `test(String string)`

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

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

  ### Methods inherited from interface java.util.function.Predicate

  `and, negate, or`

- ## Constructor Details

  - ### RegexInputStreamFilter

    public RegexInputStreamFilter(String regex)
    Constructor.
    Parameters:
      `regex` - regular expression

  - ### RegexInputStreamFilter

    public RegexInputStreamFilter(Pattern pattern)
    Constructor.
    Parameters:
      `pattern` - regular expression pattern

- ## Method Details

  - ### test

    public boolean test(String string)
    Specified by:
      `test` in interface `Predicate<String>`