MCPcopy Index your code
hub / github.com/arduino/Arduino / inputStreamToString

Method inputStreamToString

app/test/processing/app/TestHelper.java:36–49  ·  view source on GitHub ↗
(InputStream is)

Source from the content-addressed store, hash-verified

34public class TestHelper {
35
36 public static String inputStreamToString(InputStream is) throws IOException {
37 StringWriter sw = new StringWriter();
38
39 BufferedReader reader = new BufferedReader(new InputStreamReader(is));
40 String line;
41 try {
42 while ((line = reader.readLine()) != null) {
43 sw.append(line).append('\n');
44 }
45 return sw.toString();
46 } finally {
47 is.close();
48 }
49 }
50}

Callers 2

getFileContentMethod · 0.95
shouldCorrectlyParseMethod · 0.95

Calls 2

toStringMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected