Package com.norconex.commons.lang.io

# Class FilteredInputStream

java.lang.Object
java.io.InputStream
com.norconex.commons.lang.io.FilteredInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class FilteredInputStream extends InputStream
Decorates an InputStream with a stream filter. The stream filter allows to control which line of text is being returned by the decorated instance when read.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FilteredInputStream(InputStream is, Predicate<String> filter)`
  Constructor, using UTF-8 as the character encoding.
  `FilteredInputStream(InputStream is, Predicate<String> filter, String encoding)`
  Constructor.
  `FilteredInputStream(InputStream is, Predicate<String> filter, Charset encoding)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `read()`

  ### Methods inherited from class java.io.InputStream

  `available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

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

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

- ## Constructor Details

  - ### FilteredInputStream

    public FilteredInputStream(InputStream is, Predicate<String> filter) throws IOException
    Constructor, using UTF-8 as the character encoding.
    Parameters:
      `is` - input stream to filter
      `filter` - the filter to apply
    Throws:
      `IOException` - i/o problem

  - ### FilteredInputStream

    public FilteredInputStream(InputStream is, Predicate<String> filter, Charset encoding) throws IOException
    Constructor.
    Parameters:
      `is` - input stream to filter
      `filter` - the filter to apply
      `encoding` - character encoding
    Throws:
      `IOException` - i/o problem
    Since:
      1.14.0

  - ### FilteredInputStream

    public FilteredInputStream(InputStream is, Predicate<String> filter, String encoding) throws IOException
    Constructor.
    Parameters:
      `is` - input stream to filter
      `filter` - the filter to apply
      `encoding` - character encoding
    Throws:
      `IOException` - i/o problem
    Since:
      1.5.0

- ## Method Details

  - ### read

    public int read() throws IOException
    Specified by:
      `read` in class `InputStream`
    Throws:
      `IOException`