Application of chitosan as an adsorbent to treat rice mill wastewater--mechanism, modelling and optimization.