: Class REFilterReader

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.regexp
Class REFilterReader

    java.lang.Object
      |
      +--java.io.Reader
            |
            +--java.io.FilterReader
                  |
                  +--gnu.regexp.REFilterReader

public class REFilterReader
extends java.io.FilterReader

Replaces instances of a given RE with replacement text.

Since:
  gnu.regexp 1.1.0
Author:
  Lee Sau Dan

Constructor Summary
`REFilterReader(java.io.Reader stream, RE expr, java.lang.String replace)` Creates an REFilterReader.

Method Summary
`boolean` | `markSupported()` Returns false.
`int` | `read()` Reads the next character from the stream per the general contract of Reader.read().
`int` | `read(char[] b)` Reads from the stream into the provided array.
`int` | `read(char[] b, int off, int len)` Reads from the stream into the provided array.

Methods inherited from class java.io.FilterReader
`close, mark, ready, reset, skip`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### REFilterReader

    public REFilterReader(java.io.Reader stream,
                          RE expr,
                          java.lang.String replace)

  Creates an REFilterReader. 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:
    `stream` - The Reader to be filtered.
    `expr` - The regular expression to search for.
    `replace` - The text pattern to replace matches with.

Method Detail

### read

    public int read()

  Reads the next character from the stream per the general contract of Reader.read(). Returns -1 on error or end of stream.
  Overrides:
    `read` in class `java.io.FilterReader`

### markSupported

    public boolean markSupported()

  Returns false. REFilterReader does not support mark() and reset() methods.
  Overrides:
    `markSupported` in class `java.io.FilterReader`

### read

    public int read(char[] b,
                    int off,
                    int len)

  Reads from the stream into the provided array.
  Overrides:
    `read` in class `java.io.FilterReader`

### read

    public int read(char[] b)

  Reads from the stream into the provided array.
  Overrides:
    `read` in class `java.io.Reader`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD