'Copy at most C{self._freeSpace} bytes from C{data} into C{self._written}.
@return: A C{int} indicating how many bytes were copied from C{data}.'

def writeSomeData(self, data):

    acceptLength = min(self._freeSpace, len(data))
    if acceptLength:
        self._freeSpace -= acceptLength
        self._written.append(data[:acceptLength])
    return acceptLength
