1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Introducing CollectStdOut and CollectStdOutStderrExecutor, handy classes for executing external execs and collecting their outputs

This commit is contained in:
Federico Fissore
2015-03-19 10:17:10 +01:00
parent b93bd8ea7f
commit ad72e41aa0
5 changed files with 59 additions and 9 deletions

View File

@ -27,9 +27,9 @@ import com.apple.eio.FileManager;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.Executor;
import processing.app.debug.TargetPackage;
import processing.app.tools.ExternalProcessExecutor;
import processing.app.legacy.PApplet;
import processing.app.legacy.PConstants;
import processing.app.tools.CollectStdOutExecutor;
import javax.swing.*;
import java.awt.*;
@ -231,7 +231,7 @@ public class Platform extends processing.app.Platform {
@Override
public String preListAllCandidateDevices() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Executor executor = new ExternalProcessExecutor(baos);
Executor executor = new CollectStdOutExecutor(baos);
try {
CommandLine toDevicePath = CommandLine.parse("/usr/sbin/system_profiler SPUSBDataType");