15
I always ignore the names and look at what's returned. If your code has an OutputStream, you can write to it - which means it's the input for the other process. If your code has an InputStream, you can read from it - which means it's the output or error for the other process.
Fortunately, the compiler will tell you if you're doing the wrong thing - you've got the data you want to provde, so you've got to write it to the stream, which means it's got to be the OutputStream.