com.stevesoft.pat
Class RegexReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--com.stevesoft.pat.RegexReader

public class RegexReader
extends java.io.Reader

This class allows you to replace the text in strings as you read them in. Be careful what you do with this freedom... using Regex.perlCode("s{.*}{x}s") as your pattern will result in loading the entire contents of the Reader into memory.


Fields inherited from class java.io.Reader
lock
 
Constructor Summary
RegexReader(Regex rex, java.io.Reader r)
           
RegexReader(Transformer tex, java.io.Reader r)
           
 
Method Summary
 void close()
           
 int getBufferSize()
          Get the size of the working buffer.
 char getEOLchar()
          Deprecated.  
 int getMaxLines()
          Deprecated.  
 boolean markSupported()
           
 int read()
           
 int read(char[] buf, int off, int len)
           
 void reset()
           
 void setBufferSize(int n)
          Set the size of the working buffer.
 void setEOLchar(char c)
          Deprecated.  
 void setMaxLines(int ml)
          Deprecated.  
 long skip(long d)
           
 
Methods inherited from class java.io.Reader
mark, read, ready
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexReader

public RegexReader(Regex rex,
                   java.io.Reader r)

RegexReader

public RegexReader(Transformer tex,
                   java.io.Reader r)
Method Detail

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.Reader

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.Reader

read

public int read(char[] buf,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.Reader

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.Reader

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.Reader

getBufferSize

public int getBufferSize()
Get the size of the working buffer. The current buffer may be larger if the pattern demands it.

setBufferSize

public void setBufferSize(int n)
Set the size of the working buffer. The current buffer may be larger if the pattern demands it.

getMaxLines

public int getMaxLines()
Deprecated.  

This function no longer serves any purpose.

setMaxLines

public void setMaxLines(int ml)
Deprecated.  

This function no longer serves any purpose.

getEOLchar

public char getEOLchar()
Deprecated.  

This function no longer serves any purpose.

setEOLchar

public void setEOLchar(char c)
Deprecated.  

This function no longer serves any purpose.

skip

public long skip(long d)
          throws java.io.IOException
Overrides:
skip in class java.io.Reader