Constify the 'dump' method so that it can be called by a const object.