List of usage examples for org.apache.commons.exec PumpStreamHandler setProcessInputStream
public void setProcessInputStream(final OutputStream os)
OutputStream
by means of which input can be sent to the process. From source file:com.blackducksoftware.tools.scmconnector.core.CommandLineExecutor.java
private void providePromptResponse(PumpStreamHandler psh, String promptResponse) throws IOException { if (promptResponse == null) { return;//from ww w . j a v a 2 s. co m } OutputStream out = new ByteArrayOutputStream(); psh.setProcessInputStream(out); String responseWithEOL = promptResponse + "\n"; out.write(responseWithEOL.getBytes()); }