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

edu.internet2.middleware.grouper.util.CollectingLogOutputStream Maven / Gradle / Ivy

There is a newer version: 5.12.2
Show newest version
package edu.internet2.middleware.grouper.util;

import java.util.LinkedList;
import java.util.List;
import org.apache.commons.exec.LogOutputStream;

public class CollectingLogOutputStream extends LogOutputStream {
    private final List lines = new LinkedList();
    @Override protected void processLine(String line, int level) {
        lines.add(line);
    }   
    public List getLines() {
        return lines;
    }
    public String getAllLines() {
      
      if (lines.size() == 0) {
        return "";
      }
      return GrouperUtil.join(lines.iterator(), '\n');
      
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy