'The beginning and end of most _writedata() implementations are the
same, but the details of writing the data array itself can vary between
HDU types, so that should be implemented in this method.
Should return the size in bytes of the data written.'

def _writedata_internal(self, fileobj):

    if (not fileobj.simulateonly):
        fileobj.writearray(self.data)
    return (self.data.size * self.data.itemsize)
