Designing Custom Encoders

encodeToStream() Method

Encodes an XML representation of a message into an OutputStream object, encoded in custom format.