task: use int types in writeTo methods

Signed-off-by: Chris Hannon <himynameschris@gmail.com>