public static InputStream routeStreamThroughProcess(final Process p, final InputStream origin, final boolean closeInput)
	{
		InputStream processSTDOUT = p.getInputStream();
		OutputStream processSTDIN = p.getOutputStream();

		// Kick off a background copy to the process
		StreamUtil.doBackgroundCopy(origin, processSTDIN, DUMMY_MONITOR, true, closeInput);

		return processSTDOUT;
	}
public static InputStream routeStreamThroughProcess ( final Process p , final InputStream origin , final boolean closeInput ) { InputStream processSTDOUT = p . getInputStream ( ) ; OutputStream processSTDIN = p . getOutputStream ( ) ; StreamUtil . doBackgroundCopy ( origin , processSTDIN , DUMMY_MONITOR , true , closeInput ) ; return processSTDOUT ; }
Given a Process, this function will route the flow of data through it & out again

@param p
@param origin
@param closeInput

@return