Implement streamWriteWord