def _sync_io(self):
        """Update the stream with changes to the file object contents."""
        if self._file_epoch == self.file_object.epoch:
            return

        if self._io.binary:
            contents = self.file_object.byte_contents
        else:
            contents = self.file_object.contents

        self._set_stream_contents(contents)
        self._file_epoch = self.file_object.epoch
Update the stream with changes to the file object contents.