called by the class that is responsible for writing this sucker . subclasses should implement this so that their data is passed back in a byte array . @ param offset to in bytes @ param data the data stream to serialize to . @ throws ioexception if an error occurs while writing .