public static String getText(InputStream stream) throws IOException {
    return getText(new InputStreamReader(stream));
  }
Returns the text read from the given stream as a String.
Closes the given stream upon return.
spock-core/src/main/java/org/spockframework/util/IoUtil.java