org.apache.tools.ant.filters
public abstract class BaseFilterReader extends FilterReader
Constructor Summary | |
---|---|
BaseFilterReader()
Constructor used by Ant's introspection mechanism.
| |
BaseFilterReader(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 String | readFully()
Reads to the end of the stream, returning the contents as a String.
|
protected 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. |
Parameters: in A Reader object providing the underlying stream.
Must not be null
.
Returns: whether or not the filter is initialized
Returns: the project this filter is part of
Parameters: 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.
Returns: the number of characters read, or -1 if the end of the stream has been reached
Throws: IOException If an I/O error occurs
Returns: the remaining contents of the reader, as a String
Throws: IOException if the underlying reader throws one during reading
Returns: the line read, or null
if the end of the stream
has already been reached
Throws: IOException if the underlying reader throws one during reading
Parameters: initialized Whether or not the filter is initialized.
Parameters: project The project this filter is part of.
Should not be null
.
Parameters: n The number of characters to skip
Returns: the number of characters actually skipped
Throws: IllegalArgumentException If n
is negative. IOException If an I/O error occurs