Class COM.stevesoft.pat.RegexReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--COM.stevesoft.pat.RegexReader
- public class RegexReader
- extends java.io.FilterReader
Reads in a stream, transforming it as it is read in.
It works in the same way RegexWriter works -- it keeps
a fixed number of lines in memory (by default 2, but
this number can be changed by setMaxLines()).
- See Also:
- RegexWriter
| Fields inherited from class java.io.FilterReader |
| in |
| Fields inherited from class java.io.Reader |
| lock |
|
Method Summary
|
|
void
|
close()
|
|
char
|
getEOLchar()
Gets the End-Of-Line character (by default this is
the carriage return). |
|
int
|
getMaxLines()
|
|
boolean
|
markSupported()
Maybe in the future, but not now. |
|
int
|
read()
|
|
int
|
read(char[] ca,
int begin,
int end)
|
|
boolean
|
ready()
|
|
void
|
reset()
|
|
void
|
setEOLchar(char c)
Sets the End-Of-Line character (by default this is
the carriage return. |
|
void
|
setMaxLines(int ml)
|
|
long
|
skip(long d)
|
| Methods inherited from class java.io.FilterReader |
| close, mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.io.Reader |
| close, mark, markSupported, read, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
RegexReader
public RegexReader(Transformer t,
java.io.Reader r)
RegexReader
public RegexReader(Regex rx,
java.io.Reader r)
getMaxLines
public int getMaxLines()
setMaxLines
public void setMaxLines(int ml)
getEOLchar
public char getEOLchar()
- Gets the End-Of-Line character (by default this is
the carriage return).
setEOLchar
public void setEOLchar(char c)
- Sets the End-Of-Line character (by default this is
the carriage return.
read
public final int read()
throws java.io.IOException
- Overrides:
- read in class java.io.FilterReader
markSupported
public boolean markSupported()
- Maybe in the future, but not now. Always returns false.
- Overrides:
- markSupported in class java.io.FilterReader
close
public void close()
throws java.io.IOException
- Overrides:
- close in class java.io.FilterReader
ready
public boolean ready()
throws java.io.IOException
- Overrides:
- ready in class java.io.FilterReader
reset
public void reset()
throws java.io.IOException
- Overrides:
- reset in class java.io.FilterReader
read
public int read(char[] ca,
int begin,
int end)
throws java.io.IOException
- Overrides:
- read in class java.io.FilterReader
skip
public long skip(long d)
throws java.io.IOException
- Overrides:
- skip in class java.io.FilterReader