BaseFilterReader (Apache Ant API)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--java.io.FilterReader | +--org.apache.tools.ant.filters.BaseFilterReader
Base class for core filter readers.
Field Summary |
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
BaseFilterReader()
Constructor used by Ant's introspection mechanism. |
|
BaseFilterReader(java.io.Reader in)
Creates a new filtered reader. |
Method Summary | |
protected boolean |
getInitialized()
Returns the initialized status. |
protected Project |
getProject()
Returns the project this filter is part of. |
int |
read(char[] cbuf,
int off,
int len)
Reads characters into a portion of an array. |
protected java.lang.String |
readFully()
Reads to the end of the stream, returning the contents as a String. |
protected java.lang.String |
readLine()
Reads a line of text ending with '\n' (or until the end of the stream). |
protected void |
setInitialized(boolean initialized)
Sets the initialized status. |
void |
setProject(Project project)
Sets the project to work with. |
long |
skip(long n)
Skips characters. |
Methods inherited from class java.io.FilterReader |
close, mark, markSupported, read, ready, reset |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseFilterReader()
public BaseFilterReader(java.io.Reader in)
in
- A Reader object providing the underlying stream.
Must not be null
.Method Detail |
public final int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.FilterReader
cbuf
- Destination buffer to write characters to.
Must not be null
.off
- Offset at which to start storing characters.len
- Maximum number of characters to read.
java.io.IOException
- If an I/O error occurspublic final long skip(long n) throws java.io.IOException
skip
in class java.io.FilterReader
n
- The number of characters to skip
java.lang.IllegalArgumentException
- If n
is negative.
java.io.IOException
- If an I/O error occursprotected final void setInitialized(boolean initialized)
initialized
- Whether or not the filter is initialized.protected final boolean getInitialized()
public final void setProject(Project project)
project
- The project this filter is part of.
Should not be null
.protected final Project getProject()
protected final java.lang.String readLine() throws java.io.IOException
null
if the end of the stream
has already been reached
java.io.IOException
- if the underlying reader throws one during
readingprotected final java.lang.String readFully() throws java.io.IOException
java.io.IOException
- if the underlying reader throws one during
reading
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |