writeExternal