<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateData(self,exten,data):
 """ Write out updated data and header to the original input file for this object. """

        _extnum=self._interpretExten(exten)
        fimg = fileutil.openImage(self._filename, mode='update', memmap=False)
        fimg[_extnum].data = data
        fimg[_extnum].header = self._image[_extnum].header
        fimg.close()