Package org.apache.tools.ant.util

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


                ? errorLog : new TeeOutputStream(errorLog, errorStream);
        }
        if ((outputFilterChains != null && outputFilterChains.size() > 0)
            || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream outPumpIn = snk;

                Reader reader = new InputStreamReader(outPumpIn, inputEncoding);

                if (outputFilterChains != null && outputFilterChains.size() > 0) {
                    ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setProject(managingTask.getProject());
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(outputFilterChains);
                    reader = helper.getAssembledReader();
                }
                outPumpIn = new ReaderInputStream(reader, outputEncoding);

                Thread t = new Thread(threadGroup, new StreamPumper(
                    outPumpIn, outputStream, true), "output pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                outputStream = new PipedOutputStream(snk);
                t.start();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error setting up output stream", eyeOhEx);
            }
        }

        if ((errorFilterChains != null && errorFilterChains.size() > 0)
            || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream errPumpIn = snk;

                Reader reader = new InputStreamReader(errPumpIn, inputEncoding);
View Full Code Here


            }

            if ((outputFilterChains != null && outputFilterChains.size() > 0)
                    || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream outPumpIn = snk;

                    Reader reader = new InputStreamReader(outPumpIn,
                            inputEncoding);

                    if (outputFilterChains != null
                            && outputFilterChains.size() > 0) {
                        ChainReaderHelper helper = new ChainReaderHelper();
                        helper.setProject(managingTask.getProject());
                        helper.setPrimaryReader(reader);
                        helper.setFilterChains(outputFilterChains);
                        reader = helper.getAssembledReader();
                    }
                    outPumpIn = new ReaderInputStream(reader, outputEncoding);

                    Thread t = new Thread(threadGroup, new StreamPumper(
                            outPumpIn, outputStream, true), "output pumper");
                    t.setPriority(Thread.MAX_PRIORITY);
                    outputStream = new PipedOutputStream(snk);
                    t.start();
                } catch (IOException eyeOhEx) {
                    throw new BuildException("error setting up output stream",
                            eyeOhEx);
                }
            }
        }

        synchronized (errMutex) {
            errorStreams();
            if (alwaysLogErr || errorStream == null) {
                OutputStream errorLog = new LogOutputStream(managingTask,
                        Project.MSG_WARN);
                errorStream = (errorStream == null) ? errorLog
                        : new TeeOutputStream(errorLog, errorStream);
            }

            if ((errorFilterChains != null && errorFilterChains.size() > 0)
                    || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream errPumpIn = snk;

                    Reader reader = new InputStreamReader(errPumpIn,
                            inputEncoding);
View Full Code Here

            }

            if ((outputFilterChains != null && outputFilterChains.size() > 0)
                    || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream outPumpIn = snk;

                    Reader reader = new InputStreamReader(outPumpIn,
                            inputEncoding);

                    if (outputFilterChains != null
                            && outputFilterChains.size() > 0) {
                        ChainReaderHelper helper = new ChainReaderHelper();
                        helper.setProject(managingTask.getProject());
                        helper.setPrimaryReader(reader);
                        helper.setFilterChains(outputFilterChains);
                        reader = helper.getAssembledReader();
                    }
                    outPumpIn = new ReaderInputStream(reader, outputEncoding);

                    Thread t = new Thread(threadGroup, new StreamPumper(
                            outPumpIn, outputStream, true), "output pumper");
                    t.setPriority(Thread.MAX_PRIORITY);
                    outputStream = new PipedOutputStream(snk);
                    t.start();
                } catch (IOException eyeOhEx) {
                    throw new BuildException("error setting up output stream",
                            eyeOhEx);
                }
            }
        }

        synchronized (errMutex) {
            errorStreams();
            if (alwaysLogErr || errorStream == null) {
                OutputStream errorLog = new LogOutputStream(managingTask,
                        Project.MSG_WARN);
                errorStream = (errorStream == null) ? errorLog
                        : new TeeOutputStream(errorLog, errorStream);
            }

            if ((errorFilterChains != null && errorFilterChains.size() > 0)
                    || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream errPumpIn = snk;

                    Reader reader = new InputStreamReader(errPumpIn,
                            inputEncoding);
View Full Code Here

        }

        if ((outputFilterChains != null && outputFilterChains.size() > 0)
            || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingTask(managingTask);
   
                InputStream outPumpIn = snk;

                Reader reader = new InputStreamReader(outPumpIn, inputEncoding);

                if (outputFilterChains != null && outputFilterChains.size() > 0) {
                    ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(outputFilterChains);
                    reader = helper.getAssembledReader();
                }
                outPumpIn = new ReaderInputStream(reader, outputEncoding);

                Thread t = new Thread(threadGroup, new StreamPumper(
                    outPumpIn, outputStream, true), "output pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                outputStream = new PipedOutputStream(snk);
                t.start();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error setting up output stream", eyeOhEx);
            }
        }

        if ((errorFilterChains != null && errorFilterChains.size() > 0)
            || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingTask(managingTask);
   
                InputStream errPumpIn = snk;

                Reader reader = new InputStreamReader(errPumpIn, inputEncoding);
View Full Code Here

            }

            if ((outputFilterChains != null && outputFilterChains.size() > 0)
                    || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream outPumpIn = snk;

                    Reader reader = new InputStreamReader(outPumpIn,
                            inputEncoding);

                    if (outputFilterChains != null
                            && outputFilterChains.size() > 0) {
                        ChainReaderHelper helper = new ChainReaderHelper();
                        helper.setProject(managingTask.getProject());
                        helper.setPrimaryReader(reader);
                        helper.setFilterChains(outputFilterChains);
                        reader = helper.getAssembledReader();
                    }
                    outPumpIn = new ReaderInputStream(reader, outputEncoding);

                    Thread t = new Thread(threadGroup, new StreamPumper(
                            outPumpIn, outputStream, true), "output pumper");
                    t.setPriority(Thread.MAX_PRIORITY);
                    outputStream = new PipedOutputStream(snk);
                    t.start();
                } catch (IOException eyeOhEx) {
                    throw new BuildException("error setting up output stream",
                            eyeOhEx);
                }
            }
        }

        synchronized (errMutex) {
            errorStreams();
            if (alwaysLogErr || errorStream == null) {
                OutputStream errorLog = new LogOutputStream(managingTask,
                        Project.MSG_WARN);
                errorStream = (errorStream == null) ? errorLog
                        : new TeeOutputStream(errorLog, errorStream);
            }

            if ((errorFilterChains != null && errorFilterChains.size() > 0)
                    || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream errPumpIn = snk;

                    Reader reader = new InputStreamReader(errPumpIn,
                            inputEncoding);
View Full Code Here

                ? errorLog : new TeeOutputStream(errorLog, errorStream);
        }
        if ((outputFilterChains != null && outputFilterChains.size() > 0)
            || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream outPumpIn = snk;

                Reader reader = new InputStreamReader(outPumpIn, inputEncoding);

                if (outputFilterChains != null && outputFilterChains.size() > 0) {
                    ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(outputFilterChains);
                    reader = helper.getAssembledReader();
                }
                outPumpIn = new ReaderInputStream(reader, outputEncoding);

                Thread t = new Thread(threadGroup, new StreamPumper(
                    outPumpIn, outputStream, true), "output pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                outputStream = new PipedOutputStream(snk);
                t.start();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error setting up output stream", eyeOhEx);
            }
        }

        if ((errorFilterChains != null && errorFilterChains.size() > 0)
            || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream errPumpIn = snk;

                Reader reader = new InputStreamReader(errPumpIn, inputEncoding);
View Full Code Here

                ? errorLog : new TeeOutputStream(errorLog, errorStream);
        }
        if ((outputFilterChains != null && outputFilterChains.size() > 0)
            || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream outPumpIn = snk;

                Reader reader = new InputStreamReader(outPumpIn, inputEncoding);

                if (outputFilterChains != null && outputFilterChains.size() > 0) {
                    ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setProject(managingTask.getProject());
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(outputFilterChains);
                    reader = helper.getAssembledReader();
                }
                outPumpIn = new ReaderInputStream(reader, outputEncoding);

                Thread t = new Thread(threadGroup, new StreamPumper(
                    outPumpIn, outputStream, true), "output pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                outputStream = new PipedOutputStream(snk);
                t.start();
            } catch (IOException eyeOhEx) {
                throw new BuildException(
                    "error setting up output stream", eyeOhEx);
            }
        }

        if ((errorFilterChains != null && errorFilterChains.size() > 0)
            || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);

                InputStream errPumpIn = snk;

                Reader reader = new InputStreamReader(errPumpIn, inputEncoding);
View Full Code Here

            }

            if ((outputFilterChains != null && outputFilterChains.size() > 0)
                    || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream outPumpIn = snk;

                    Reader reader = new InputStreamReader(outPumpIn,
                            inputEncoding);

                    if (outputFilterChains != null
                            && outputFilterChains.size() > 0) {
                        ChainReaderHelper helper = new ChainReaderHelper();
                        helper.setProject(managingTask.getProject());
                        helper.setPrimaryReader(reader);
                        helper.setFilterChains(outputFilterChains);
                        reader = helper.getAssembledReader();
                    }
                    outPumpIn = new ReaderInputStream(reader, outputEncoding);

                    Thread t = new Thread(threadGroup, new StreamPumper(
                            outPumpIn, outputStream, true), "output pumper");
                    t.setPriority(Thread.MAX_PRIORITY);
                    outputStream = new PipedOutputStream(snk);
                    t.start();
                } catch (IOException eyeOhEx) {
                    throw new BuildException("error setting up output stream",
                            eyeOhEx);
                }
            }
        }

        synchronized (errMutex) {
            errorStreams();
            if (alwaysLogErr || errorStream == null) {
                OutputStream errorLog = new LogOutputStream(managingTask,
                        Project.MSG_WARN);
                errorStream = (errorStream == null) ? errorLog
                        : new TeeOutputStream(errorLog, errorStream);
            }

            if ((errorFilterChains != null && errorFilterChains.size() > 0)
                    || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream errPumpIn = snk;

                    Reader reader = new InputStreamReader(errPumpIn,
                            inputEncoding);
View Full Code Here

            }

            if ((outputFilterChains != null && outputFilterChains.size() > 0)
                    || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream outPumpIn = snk;

                    Reader reader = new InputStreamReader(outPumpIn,
                            inputEncoding);

                    if (outputFilterChains != null
                            && outputFilterChains.size() > 0) {
                        ChainReaderHelper helper = new ChainReaderHelper();
                        helper.setProject(managingTask.getProject());
                        helper.setPrimaryReader(reader);
                        helper.setFilterChains(outputFilterChains);
                        reader = helper.getAssembledReader();
                    }
                    outPumpIn = new ReaderInputStream(reader, outputEncoding);

                    Thread t = new Thread(threadGroup, new StreamPumper(
                            outPumpIn, outputStream, true), "output pumper");
                    t.setPriority(Thread.MAX_PRIORITY);
                    outputStream = new PipedOutputStream(snk);
                    t.start();
                } catch (IOException eyeOhEx) {
                    throw new BuildException("error setting up output stream",
                            eyeOhEx);
                }
            }
        }

        synchronized (errMutex) {
            errorStreams();
            if (alwaysLogErr || errorStream == null) {
                OutputStream errorLog = new LogOutputStream(managingTask,
                        Project.MSG_WARN);
                errorStream = (errorStream == null) ? errorLog
                        : new TeeOutputStream(errorLog, errorStream);
            }

            if ((errorFilterChains != null && errorFilterChains.size() > 0)
                    || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
                try {
                    LeadPipeInputStream snk = new LeadPipeInputStream();
                    snk.setManagingComponent(managingTask);

                    InputStream errPumpIn = snk;

                    Reader reader = new InputStreamReader(errPumpIn,
                            inputEncoding);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.util.LeadPipeInputStream

Copyright © 2018 www.massapicom. 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.