Ultraviolet absorption of contaminants in water