Elastic and inelastic scattering of 158 MeV 9Be ions