code: public static String getText(Process self) throws IOException {
          String text = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(self.getInputStream())));
          closeStreams(self);
          return text;
      }
docs: Read the text of the output stream of the Process.
  Closes all the streams associated with the process after retrieving the text.
  
  @param self a Process instance
  @return the text of the output
  @throws java.io.IOException if an IOException occurs.
  @since 1.0