public function getContentStream(
        $repositoryId,
        $objectId,
        $streamId = null,
        $offset = null,
        $length = null,
        ExtensionDataInterface $extension = null
    ) {
        if (empty($objectId)) {
            throw new CmisInvalidArgumentException('Object id must not be empty!');
        }

        $url = $this->getObjectUrl($repositoryId, $objectId, Constants::SELECTOR_CONTENT);

        if ($streamId !== null) {
            $url->getQuery()->modify([Constants::PARAM_STREAM_ID => $streamId]);
        }

        /** @var Response $response */
        $response = $this->getHttpInvoker()->get((string) $url);

        $contentStream = $response->getBody();
        if (!$contentStream) {
            return null;
        }

        if ($offset !== null) {
            $contentStream = new LimitStream($contentStream, $length !== null ? $length : - 1, $offset);
        }

        return $contentStream;
    }