Skip to content

Instantly share code, notes, and snippets.

@mattnworb
Created September 14, 2012 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattnworb/3723290 to your computer and use it in GitHub Desktop.
Save mattnworb/3723290 to your computer and use it in GitHub Desktop.
InputStream inputstream = process.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(inputstream));
String line;
while ((line = br.readLine()) != null) {
// handle the new line of input from the process however you want
gsc.mainWindow.printf("Got another line! " + line);
// do anything else you want with the input - send it as many places as you like
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment