private void pumpInputData ( ) throws IOException { for ( Input input : inputs ) { if ( input . pump == null ) { continue ; } OutputStream os ; if ( input . pipeName . equals ( STDIN_FILE_NAME ) ) { os = process . getOutputStream ( ) ; } else { throw new IOException ( "Only stdin piping is supported so far." ) ; } input . pump . pump ( os ) ; } }
Loops through inputs and for each pumps the data into the proper pipe stream connected to the executing process .