public function setEncoding($encoding)
    {
        if (strlen($encoding) == 0) {
            throw new \InvalidArgumentException(sprintf('Encoding should not be empty'));
        }

        $this->encoding = $encoding;

        return $this;
    }