Method and Apparatus for Treating Materials