Examples of KeepAliveOutputStream


Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: "
                        + errorProperty, Project.MSG_VERBOSE);
            }
            // shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                    : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

     * <p> Defaults to standard out.
     * @param out the output stream to use.
     */
    public void setOutput(OutputStream out) {
        if (out == System.out || out == System.err) {
            out = new KeepAliveOutputStream(out);
        }
        this.out = out;
    }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                baos = new PropertyOutputStream(outputProperty);
                managingTask.log("Output redirected to property: "
                        + outputProperty, Project.MSG_VERBOSE);
            }
            // shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveOutput = new KeepAliveOutputStream(baos);
            outputStream = (outputStream == null) ? keepAliveOutput
                    : new TeeOutputStream(outputStream, keepAliveOutput);
        } else {
            baos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: "
                        + errorProperty, Project.MSG_VERBOSE);
            }
            // shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                    : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                    baos = new PropertyOutputStream(outputProperty);
                    managingTask.log("Output redirected to property: "
                        + outputProperty, Project.MSG_VERBOSE);
                }
                //shield it from being closed by a filtering StreamPumper
                OutputStream keepAliveOutput = new KeepAliveOutputStream(baos);
                if (outputStream == null) {
                    outputStream = keepAliveOutput;
                } else {
                    outputStream
                        = new TeeOutputStream(outputStream, keepAliveOutput);
                }
            } else {
                baos = null;
            }

            errorStream = outputStream;
        }

        if (error != null && error.length > 0) {
            String logHead = new StringBuffer("Error ").append(
                ((append) ? "appended" : "redirected")).append(
                " to ").toString();
            errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE);

        } else if (logError || errorStream == null) {
            errorStream = new LogOutputStream(managingTask, Project.MSG_WARN);
        } else { //must be errorStream == outputStream
            long funnelTimeout = 0L;
            OutputStreamFunneler funneler
                = new OutputStreamFunneler(outputStream, funnelTimeout);
            try {
                outputStream = funneler.getFunnelInstance();
                errorStream = funneler.getFunnelInstance();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error splitting output/error streams", eyeOhEx);
            }
        }

        if (errorProperty != null) {
            if (errorBaos == null) {
                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: " + errorProperty,
                    Project.MSG_VERBOSE);
            }
            //shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                baos = new PropertyOutputStream(outputProperty);
                managingTask.log("Output redirected to property: "
                        + outputProperty, Project.MSG_VERBOSE);
            }
            // shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveOutput = new KeepAliveOutputStream(baos);
            outputStream = (outputStream == null) ? keepAliveOutput
                    : new TeeOutputStream(outputStream, keepAliveOutput);
        } else {
            baos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: "
                        + errorProperty, Project.MSG_VERBOSE);
            }
            // shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                    : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                baos = new PropertyOutputStream(outputProperty);
                managingTask.log("Output redirected to property: "
                    + outputProperty, Project.MSG_VERBOSE);
            }
            //shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveOutput = new KeepAliveOutputStream(baos);
            outputStream = (outputStream == null) ? keepAliveOutput
                : new TeeOutputStream(outputStream, keepAliveOutput);
        } else {
            baos = null;
        }

        if (error != null && error.length > 0) {
            String logHead = new StringBuffer("Error ").append(
                ((append) ? "appended" : "redirected")).append(
                " to ").toString();
            errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE);
        } else if (!(logError || outputStream == null)) {
            long funnelTimeout = 0L;
            OutputStreamFunneler funneler
                = new OutputStreamFunneler(outputStream, funnelTimeout);
            try {
                outputStream = funneler.getFunnelInstance();
                errorStream = funneler.getFunnelInstance();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error splitting output/error streams", eyeOhEx);
            }
        }
        if (errorProperty != null) {
            if (errorBaos == null) {
                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: " + errorProperty,
                    Project.MSG_VERBOSE);
            }
            //shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

        if (command == null) {
            throw new BuildException("Command is required.");
        }

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        TeeOutputStream tee = new TeeOutputStream(out, new KeepAliveOutputStream(System.out));

        Session session = null;
        try {
            // execute the command
            session = openSession();
View Full Code Here

Examples of org.apache.tools.ant.util.KeepAliveOutputStream

                baos = new PropertyOutputStream(outputProperty);
                managingTask.log("Output redirected to property: "
                    + outputProperty, Project.MSG_VERBOSE);
            }
            //shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveOutput = new KeepAliveOutputStream(baos);
            outputStream = (outputStream == null) ? keepAliveOutput
                : new TeeOutputStream(outputStream, keepAliveOutput);
        } else {
            baos = null;
        }

        if (error != null && error.length > 0) {
            String logHead = new StringBuffer("Error ").append(
                ((append) ? "appended" : "redirected")).append(
                " to ").toString();
            errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE);
        } else if (!(logError || outputStream == null)) {
            long funnelTimeout = 0L;
            OutputStreamFunneler funneler
                = new OutputStreamFunneler(outputStream, funnelTimeout);
            try {
                outputStream = funneler.getFunnelInstance();
                errorStream = funneler.getFunnelInstance();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error splitting output/error streams", eyeOhEx);
            }
        }
        if (errorProperty != null) {
            if (errorBaos == null) {
                errorBaos = new PropertyOutputStream(errorProperty);
                managingTask.log("Error redirected to property: " + errorProperty,
                    Project.MSG_VERBOSE);
            }
            //shield it from being closed by a filtering StreamPumper
            OutputStream keepAliveError = new KeepAliveOutputStream(errorBaos);
            errorStream = (error == null || error.length == 0) ? keepAliveError
                : new TeeOutputStream(errorStream, keepAliveError);
        } else {
            errorBaos = null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.