1 18 19 package org.apache.tools.ant.taskdefs; 20 21 import java.io.IOException ; 22 import org.apache.tools.ant.BuildException; 23 import org.apache.tools.ant.ProjectComponent; 24 import org.apache.tools.ant.Task; 25 26 31 public class LogStreamHandler extends PumpStreamHandler { 32 33 40 public LogStreamHandler(Task task, int outlevel, int errlevel) { 41 this((ProjectComponent) task, outlevel, errlevel); 42 } 43 44 51 public LogStreamHandler(ProjectComponent pc, int outlevel, int errlevel) { 52 super(new LogOutputStream(pc, outlevel), 53 new LogOutputStream(pc, errlevel)); 54 } 55 56 59 public void stop() { 60 super.stop(); 61 try { 62 getErr().close(); 63 getOut().close(); 64 } catch (IOException e) { 65 throw new BuildException(e); 67 } 68 } 69 } 70 | Popular Tags |