Methods Summary |
---|
protected final boolean | getInitialized()Returns the initialized status.
return initialized;
|
protected final org.apache.tools.ant.Project | getProject()Returns the project this filter is part of.
return project;
|
public final int | read(char[] cbuf, int off, int len)Reads characters into a portion of an array. This method will block
until some input is available, an I/O error occurs, or the end of the
stream is reached.
for (int i = 0; i < len; i++) {
final int ch = read();
if (ch == -1) {
if (i == 0) {
return -1;
} else {
return i;
}
}
cbuf[off + i] = (char) ch;
}
return len;
|
protected final java.lang.String | readFully()Reads to the end of the stream, returning the contents as a String.
return FileUtils.readFully(in, BUFFER_SIZE);
|
protected final java.lang.String | readLine()Reads a line of text ending with '\n' (or until the end of the stream).
The returned String retains the '\n'.
int ch = in.read();
if (ch == -1) {
return null;
}
StringBuffer line = new StringBuffer();
while (ch != -1) {
line.append ((char) ch);
if (ch == '\n") {
break;
}
ch = in.read();
}
return line.toString();
|
protected final void | setInitialized(boolean initialized)Sets the initialized status.
this.initialized = initialized;
|
public final void | setProject(org.apache.tools.ant.Project project)Sets the project to work with.
this.project = project;
|
public final long | skip(long n)Skips characters. This method will block until some characters are
available, an I/O error occurs, or the end of the stream is reached.
if (n < 0L) {
throw new IllegalArgumentException("skip value is negative");
}
for (long i = 0; i < n; i++) {
if (read() == -1) {
return i;
}
}
return n;
|