void encode(T element) throws java.io.IOExceptionEncodes the given value onto the specified output stream. It has to be able to encode the given stream consequently by calling this method repeatedly. Because the user can want to keep a single output stream and continuously concatenate elements, the output stream should not be closed.
element- the element to be encoded
java.io.IOException- if fail to encode