protected function getOutputBuffer(StreamOutput $output)
{
$handle = $output->getStream();
rewind($handle);
$display = stream_get_contents($handle);
// Symfony2's StreamOutput has a hidden dependency on PHP_EOL which needs to be removed by
// normalizing it to the standard newline for text here.
$display = strtr($display, array(PHP_EOL => "\n"));
return $display;
}