def __write(self, s):
        """Write string s to the stream if a whole new block
           is ready to be written.
        """
        self.buf += s
        while len(self.buf) > self.bufsize:
            self.fileobj.write(self.buf[:self.bufsize])
            self.buf = self.buf[self.bufsize:]
Write string s to the stream if a whole new block
           is ready to be written.
        
product/gradle-plugin/src/main/python/pip/_vendor/distlib/_backport/tarfile.py