Format the data appropriate for TERMINAL RESPONSE and write it into the ByteArrayOutputStream object.