Use stringstream for BinOutput.