/** * Stop pumping the streams. */ public void stop() { if (outputThread != null) { try { outputThread.join(); } catch (InterruptedException e) { // ignore } } if (errorThread != null) { try { errorThread.join(); } catch (InterruptedException e) { // ignore } } if (inputPump != null) { inputPump.stop(); } streams.flush(); }