gnu.regexp
public class REFilterInputStream extends FilterInputStream
Deprecated: This class cannot properly handle all character encodings. For proper handling, use the REFilterReader class instead.
Replaces instances of a given RE found within an InputStream with replacement text. The replacements are interpolated into the stream when a match is found.Constructor Summary | |
---|---|
REFilterInputStream(InputStream stream, RE expr, String replace)
Creates an REFilterInputStream. |
Method Summary | |
---|---|
boolean | markSupported()
Returns false. |
int | read()
Reads the next byte from the stream per the general contract of
InputStream.read(). |
int | read(byte[] b, int off, int len) Reads from the stream into the provided array. |
int | read(byte[] b) Reads from the stream into the provided array. |
Parameters: stream The InputStream to be filtered. expr The regular expression to search for. replace The text pattern to replace matches with.