Write to a Writer or Stream