This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The getOutputStream() method gets you an OutputStream you can use to write data to the stdin of the Process you created. As such, the idea of converting that to a String doesn't make any sense.
But if your actual goal is to read the data from the stdout of the Process and put it into a String, then the getInputStream() method gets you stdout data. (It is always a good idea to state your actual goal when you post a question, rather than asking how to implement the idea you had to achieve that goal. That way when it turns out your idea is wrong, you have still asked your question.) [ May 01, 2007: Message edited by: Paul Clapham ]
Joined: Oct 17, 2006
Ok, I misunderstood your question. But I think you are misunderstanding what getOutputStream() does. It returns an OutputStream object so you can write to whatever it is connected to. It does not give you the output. You can call toString() but it will not give you any useful information.
An OutputStream is for writing to an underlying process, file, stdout, socket, whatever.
Joined: Sep 26, 2003
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com