def getvalue(self):
        """
        Get value of file. Work around for second strategy.
        Always returns bytes
        """

        if self.strategy == 0:
            return self._delegate.getvalue()
        self._delegate.flush()
        self._delegate.seek(0)
        value = self._delegate.read()
        if not isinstance(value, six.binary_type):
            value = value.encode('utf-8')
        return value
Get value of file. Work around for second strategy.
        Always returns bytes