public class ExtendedReader extends java.io.Reader
Constructor and Description |
---|
ExtendedReader(java.io.Reader in)
Creates a new extended reader that reads from the provided object
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isEndOfStream()
Determines whether the end of the stream is reached
|
boolean |
markSupported() |
int |
peek()
Returns the next character in the stream without actually comitting the read.
|
int |
read(char[] cbuf,
int off,
int len) |
java.lang.String |
readCharacters(ICharacterMatcher matcher)
Reads the next characters until a character that does not match the provided rule is reached.
|
boolean |
ready() |
void |
reset() |
long |
skip(long n) |
void |
skipCharacters(ICharacterMatcher matcher)
Skips the next characters until a character that does not match the provided rule is reached.
|
public ExtendedReader(java.io.Reader in)
in
- the Reader to get data frompublic int peek() throws java.io.IOException
java.io.IOException
- if an error occurspublic boolean isEndOfStream() throws java.io.IOException
java.io.IOException
- if an error occurspublic void skipCharacters(ICharacterMatcher matcher) throws java.io.IOException
matcher
- the object determining whether a character should be skippedjava.io.IOException
- if an error occurspublic java.lang.String readCharacters(ICharacterMatcher matcher) throws java.io.IOException
matcher
- the object determining whether a character should be readjava.io.IOException
- if an error occurspublic int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
FilterReader.read(char[], int, int)
public boolean ready() throws java.io.IOException
ready
in class java.io.Reader
java.io.IOException
FilterReader.ready()
public boolean markSupported()
markSupported
in class java.io.Reader
FilterReader.markSupported()
public void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
FilterReader.reset()
public long skip(long n) throws java.io.IOException
skip
in class java.io.Reader
java.io.IOException
FilterReader.skip(long)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException
Reader.close()