FileDocCategorySizeDatePackage
RedirectingStreamHandler.javaAPI DocApache Ant 1.701848Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.cvslib

RedirectingStreamHandler

public class RedirectingStreamHandler extends org.apache.tools.ant.taskdefs.PumpStreamHandler
A dummy stream handler that just passes stuff to the parser.

Fields Summary
Constructors Summary
RedirectingStreamHandler(ChangeLogParser parser)

        super(new RedirectingOutputStream(parser),
            new ByteArrayOutputStream());
    
Methods Summary
java.lang.StringgetErrors()

        try {
            final ByteArrayOutputStream error
                = (ByteArrayOutputStream) getErr();

            return error.toString("ASCII");
        } catch (final Exception e) {
            return null;
        }
    
public voidstop()

        super.stop();
        try {
            getErr().close();
            getOut().close();
        } catch (final IOException e) {
            // plain impossible
            throw new BuildException(e);
        }