private void redirectProcessStreams ( String id , Class < ? > klass , Process process , boolean redirectProcessStdOut ) { String errorStreamType = ( printType ? klass . getSimpleName ( ) + id + PROCESS_ERROR_STREAM_PREFIX : "" ) ; new StreamRedirector ( process . getErrorStream ( ) , errorStreamType , redirectProcessErrorStreamToParentProcessStdOut , System . err ) . start ( ) ; if ( redirectProcessStdOut ) { String outputStreamType = ( printType ? klass . getSimpleName ( ) + id + PROCESS_STDOUT_STREAM_PREFIX : "" ) ; new StreamRedirector ( process . getInputStream ( ) , outputStreamType , redirectProcessInputStreamToParentProcessStdOut , System . out ) . start ( ) ; } }
Redirects process standard output and error streams into parent process standard output .