original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Gets the content stream for the specified document object, or gets a rendition stream for
  a specified rendition of a document or folder object.
  
  @param string $repositoryId the identifier for the repository
  @param string $objectId the identifier for the object
  @param string|null $streamId The identifier for the rendition stream, when used to get a rendition stream.
  For documents, if not provided then this method returns the content stream. For folders,
  it MUST be provided.
  @param integer|null $offset
  @param integer|null $length
  @param ExtensionDataInterface|null $extension
  @return StreamInterface|null
  @throws CmisInvalidArgumentException If object id is empty
docstring_tokens: Gets the content stream for the specified document object or gets a rendition stream for a specified rendition of a document or folder object .