This also discards the number of bytes actually written.