Methods Summary |
---|
public void | close()Close the stream.
closeCurrent();
eof = true;
|
private void | closeCurrent()
FileUtils.close(currentStream);
currentStream = null;
|
public void | log(java.lang.String message, int loglevel)Log a message with the specified logging level.
if (managingPc != null) {
managingPc.log(message, loglevel);
} else {
if (loglevel > Project.MSG_WARN) {
System.out.println(message);
} else {
System.err.println(message);
}
}
|
private void | openFile(int index)
closeCurrent();
if (file != null && index < file.length) {
log("Opening " + file[index], Project.MSG_VERBOSE);
try {
currentStream = new BufferedInputStream(
new FileInputStream(file[index]));
} catch (IOException eyeOhEx) {
log("Failed to open " + file[index], Project.MSG_ERR);
throw eyeOhEx;
}
} else {
eof = true;
}
|
public int | read()Read a byte.
int result = readCurrent();
if (result == EOF && !eof) {
openFile(++currentIndex);
result = readCurrent();
}
return result;
|
private int | readCurrent()
return (eof || currentStream == null) ? EOF : currentStream.read();
|
public void | setManagingComponent(org.apache.tools.ant.ProjectComponent pc)Set a managing Task for
this ConcatFileInputStream .
this.managingPc = pc;
|
public void | setManagingTask(org.apache.tools.ant.Task task)Set a managing Task for
this ConcatFileInputStream .
setManagingComponent(task);
|