: Class REFilterInputStream

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 REFilterInputStream

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

public class REFilterInputStream
extends java.io.FilterInputStream

Replaces instances of a given RE with replacement text.

Since:
  gnu.regexp 1.0.5
Author:
  Wes Biggs

Constructor Summary
`REFilterInputStream(java.io.InputStream f_stream, RE f_expr, java.lang.String f_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)` Reads from the stream into the provided array.
`int` | `read(byte[] b, int off, int len)` Reads from the stream into the provided array.

Methods inherited from class java.io.FilterInputStream
`available, close, mark, reset, skip`

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

Constructor Detail

### REFilterInputStream

    public REFilterInputStream(java.io.InputStream f_stream,
                               RE f_expr,
                               java.lang.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.

Method Detail

### 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 java.io.FilterInputStream

### markSupported

    public boolean markSupported()

  Returns false. REFilterInputStream does not support mark() and reset() methods.
  Overrides:
    markSupported in class java.io.FilterInputStream

### read

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

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

### read

    public int read(byte[] b)

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

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