void encode(T element) throws 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
IOException- if fail to encode