The water content of a soil sample can be determined by: