icegem-core/src/main/java/com/googlecode/icegem/utils/JavaProcessLauncher.java
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();
		}
	}
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();
		}
	}
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.

@param klass
of type Class
@param process
of type Process
@param redirectProcessStdOut
of type boolean
Redirects process standard output and error streams into parent process standard output .