String encoder works with output stream.