/** * Run this command and returns the output as a simple string. * * @return The output from the command. * @throws IOException * @throws InterruptedException */ public String getOutput() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw).run(); return sw.toString(); }
/** * Returns the output from this process as a {@link Scanner}. * * @return The output from the process as a Scanner object. * @throws IOException * @throws InterruptedException */ public Scanner getScanner() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw, true); run(); return new Scanner(sw.toString()); }
/** * Run this command and returns the output as a simple string. * * @return The output from the command. * @throws IOException * @throws InterruptedException */ public String getOutput() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw).run(); return sw.toString(); }
/** * Run this command and returns the output as a simple string. * * @return The output from the command. * @throws IOException * @throws InterruptedException */ public String getOutput() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw).run(); return sw.toString(); }
/** * Returns the output from this process as a {@link Scanner}. * * @return The output from the process as a Scanner object. * @throws IOException * @throws InterruptedException */ public Scanner getScanner() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw, true); run(); return new Scanner(sw.toString()); }
/** * Returns the output from this process as a {@link Scanner}. * * @return The output from the process as a Scanner object. * @throws IOException * @throws InterruptedException */ public Scanner getScanner() throws IOException, InterruptedException { StringWriter sw = new StringWriter(); pipeTo(sw, true); run(); return new Scanner(sw.toString()); }