Set content to byte string, encoding if necessary

def content(self, value):
        """
        Set content to byte string, encoding if necessary
        """
        if isinstance(value, bytes):
            self._content = value
        else:
            self._content = value.encode(ENCODING)
        self.size = len(value)