1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

working on #223: Auto-detection of serial ports. Mac version ready even if a bit slow

This commit is contained in:
Federico Fissore
2013-01-28 18:21:41 +01:00
parent 776952762f
commit 0d47f22787
11 changed files with 365 additions and 23 deletions

View File

@ -0,0 +1,21 @@
package processing.app;
import java.io.*;
public class TestHelper {
public static String inputStreamToString(InputStream is) throws IOException {
StringWriter sw = new StringWriter();
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line;
try {
while ((line = reader.readLine()) != null) {
sw.append(line).append('\n');
}
return sw.toString();
} finally {
is.close();
}
}
}