The results of one program can be expressed as the input to another program only through services provided by the operating system. There is no Java-to-Java only way to do this without writing first to a file or using some other high-level OS facility.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
subject: how to write to a another java std input stream.