public function setFileContentFromFilesystem($filename)
    {
        if (!$filename) {
            throw new RuntimeException('The filename may not be empty');
        }
        if (!is_readable($filename)) {
            throw new RuntimeException(sprintf('File "%s" not found or not readable', $filename));
        }
        $this->getContent();
        $stream = fopen($filename, 'rb');
        if (!$stream) {
            throw new RuntimeException(sprintf('Failed to open file "%s"', $filename));
        }

        $this->content->setData($stream);
        $this->content->setLastModified(new \DateTime('@'.filemtime($filename)));

        $finfo = new \finfo();
        $this->content->setMimeType($finfo->file($filename, FILEINFO_MIME_TYPE));
        $this->content->setEncoding($finfo->file($filename, FILEINFO_MIME_ENCODING));

        return $this;
    }