def buffer2file(self):
        """
        add the code buffer content to CassetteFile() instance
        """
        if self.current_file is not None and self.buffer:
            self.current_file.add_block_data(self.buffered_block_length, self.buffer)
            self.buffer = []
            self.buffered_block_length = 0