All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gnu.regexp.REFilterInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----java.io.FilterInputStream
                   |
                   +----gnu.regexp.REFilterInputStream

public class REFilterInputStream
extends FilterInputStream
Replaces instances of a given RE with replacement text.


Constructor Index

 o REFilterInputStream(InputStream, RE, String)
Creates an REFilterInputStream.

Method Index

 o markSupported()
Returns false.
 o read()
Reads the next byte from the stream per the general contract of InputStream.read().
 o read(byte[])
Reads from the stream into the provided array.
 o read(byte[], int, int)
Reads from the stream into the provided array.

Constructors

 o REFilterInputStream
 public REFilterInputStream(InputStream f_stream,
                            RE f_expr,
                            String f_replace)
Creates an REFilterInputStream. When reading from this stream, occurrences of patterns matching the supplied regular expression will be replaced with the supplied replacement text (the metacharacters $0 through $9 may be used to refer to the full match or subexpression matches.

Parameters:
f_stream - The InputStream to be filtered.
f_expr - The regular expression to search for.
f_replace - The text pattern to replace matches with.

Methods

 o read
 public int read()
Reads the next byte from the stream per the general contract of InputStream.read(). Returns -1 on error or end of stream.

Overrides:
read in class FilterInputStream
 o markSupported
 public boolean markSupported()
Returns false. REFilterInputStream does not support mark() and reset() methods.

Overrides:
markSupported in class FilterInputStream
 o read
 public int read(byte b[],
                 int off,
                 int len)
Reads from the stream into the provided array.

Overrides:
read in class FilterInputStream
 o read
 public int read(byte b[])
Reads from the stream into the provided array.

Overrides:
read in class FilterInputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index