Integer encoder works with output stream.