Johnny_hunter wrote:I have a class called SyncPipe which is a Runnable. The constructor accepts in InputStream and an OutputStream and the run() method copies the InputStream content to the OutputStream. I use this mainly with Runtime.exec() and ProcessBuilder for handling the Process 'stdout', 'stderr' and sometimes 'stdin'. Sometimes it is necessary to have one or more of these processed by independent threads so then I just start a Thread using a SyncPipe as the Runnable. Other times I can use the thread that started the Process so I then invoke SyncPipe.run() directly.
thanks, jverd. I wouldn't use run() myself, so it seems odd someone uses it like that.