Showing posts with label stream. Show all posts
Showing posts with label stream. Show all posts

Monday, June 11, 2012

Get an OutputStream into a String


What's the best way to pipe the output from an java.io.OutputStream to a String in Java?

Sunday, June 10, 2012

bash: redirect and append both stdout and stderr


To redirect stdout in bash, overwriting file




cmd > file.txt



To redirect stdout in bash, appending to file

Friday, June 1, 2012

Best way to copy between two Stream instances - C#


What is the best way to copy the contents of one stream to another? Is there a standard utility method for this?

Friday, May 25, 2012

Friday, April 27, 2012

Tuesday, February 14, 2012

Can I demultiplex streams?


I want to join stderr ( getErrorStream ) and stdout ( getInputStream ) of a Process into a single Stream to be consumed elsewhere. Is there anything in Java's library that will do that for me?