Cavity dumping for free electron lasers.