All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tw.go.plugin.cmd.ProcessOutputStreamConsumer Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package com.tw.go.plugin.cmd;

import org.apache.commons.exec.LogOutputStream;

import java.util.List;

public class ProcessOutputStreamConsumer extends LogOutputStream {
    private StreamConsumer streamConsumer;

    public ProcessOutputStreamConsumer(StreamConsumer streamConsumer) {
        this.streamConsumer = streamConsumer;
    }

    public void consumeLine(String line) {
        streamConsumer.consumeLine(line);
    }

    public List output() {
        return streamConsumer.asList();
    }

    @Override
    protected void processLine(String line, int level) {
        consumeLine(line);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy