write method processSpace
write method processEscape