use of org.apache.tools.ant.util.LazyFileOutputStream in project ant by apache.
the class Redirector method foldFiles.
private OutputStream foldFiles(final File[] file, final String logHead, final int loglevel, final boolean append, final boolean createEmptyFiles) {
final OutputStream result = new LazyFileOutputStream(file[0], append, createEmptyFiles);
managingTask.log(logHead + file[0], loglevel);
final char[] c = new char[logHead.length()];
Arrays.fill(c, ' ');
final String indent = new String(c);
for (int i = 1; i < file.length; i++) {
outputStream = new TeeOutputStream(outputStream, new LazyFileOutputStream(file[i], append, createEmptyFiles));
managingTask.log(indent + file[i], loglevel);
}
return result;
}
Aggregations