public static byte[] serializeAndEncodeObject(final CipherExecutor cipher,
                                                  final Serializable object,
                                                  final Object[] parameters) {
        val outBytes = serialize(object);
        return (byte[]) cipher.encode(outBytes, parameters);
    }
public static byte [ ] serializeAndEncodeObject ( final CipherExecutor cipher , final Serializable object , final Object [ ] parameters ) { val outBytes = serialize ( object ) ; return ( byte [ ] ) cipher . encode ( outBytes , parameters ) ; }
Serialize and encode object.

@param cipher     the cipher
@param object     the object
@param parameters the parameters
@return the byte []
@since 4.2