Returns the content stream of the rendition.

@return StreamInterface|null the content stream of the rendition
or <code>null</code> if the rendition has no content
516967
public function getContentStream()
    {
        if (!$this->objectId || !$this->getStreamId()) {
            return null;
        }

        return $this->session->getBinding()->getObjectService()->getContentStream(
            $this->session->getRepositoryInfo()->getId(),
            $this->objectId,
            $this->getStreamId()
        );
    }
93697
public function stream()
    {
        $stream = fopen($this->file, 'r');

        $stream = $stream === false ? null : $stream;

        return new Stream($stream);
    }
352370
public function getMediaType()
    {
        $contentType = $this->getContentType();
        if (is_string($contentType)) {
            $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType);

            return isset($contentTypeParts[0]) ? strtolower($contentTypeParts[0]) : null;
        }

        return null;
    }
771195
protected function getStreamContext()
    {
        $pem = $this->pemPath;
        $passphrase = $this->passphrase;

        // Create cache pem file if needed
        if (!empty($this->pemContent)) {
            $filename = $this->cachedir . self::APNS_CERTIFICATE_FILE;

            $fs = new Filesystem();
            $fs->mkdir(dirname($filename));
            file_put_contents($filename, $this->pemContent);

            // Now we use this file as pem
            $pem = $filename;
            $passphrase = $this->pemContentPassphrase;
        }

        $ctx = stream_context_create();
        stream_context_set_option($ctx, "ssl", "local_cert", $pem);
        if (strlen($passphrase)) {
            stream_context_set_option($ctx, "ssl", "passphrase", $passphrase);
        }

        return $ctx;
    }
1297672
public function getBody()
    {
        $streamResource = fopen('php://memory', 'r+');
        if (is_resource($this->content)) {
            stream_copy_to_stream($this->content, $streamResource);
        } else {
            fwrite($streamResource, $this->content);
        }
        rewind($streamResource);

        return new ContentStream($streamResource);
    }
1369668
@GET
    public Response getStreamContents() {

        // Intercept all output
        StreamingOutput stream = new StreamingOutput() {

            @Override
            public void write(OutputStream output) throws IOException {
                try {
                    tunnel.interceptStream(streamIndex, output);
                }
                catch (GuacamoleException e) {
                    throw new IOException(e);
                }
            }

        };

        // Begin successful response
        ResponseBuilder responseBuilder = Response.ok(stream, mediaType);

        // Set Content-Disposition header for "application/octet-stream"
        if (mediaType.equals(MediaType.APPLICATION_OCTET_STREAM))
            responseBuilder.header("Content-Disposition", "attachment");

        return responseBuilder.build();

    }
1083242
public function getStream()
    {
        if ($this->stream === null) {
            return $this->streamFactory->newMessagePartStream($this);
        }
        $this->stream->rewind();
        return $this->stream;
    }
127238
public function stream()
	{
		$fp = fopen("php://memory", 'r+');
		fwrite($fp, $this->_string);
		rewind($fp);
		return $fp;
	}
608782
function getStream()
    {
        if ($err = $this->getError() !== UPLOAD_ERR_OK)
            // TODO Handle Upload With Exception Error
            throw new \RuntimeException(sprintf(
                'Cannot retrieve stream due to upload error. error: (%s).'
                , getUploadErrorMessageFromCode($err)
            ));

        if ($this->isFileMoved)
            throw new \RuntimeException('Cannot retrieve stream after it has already been moved');

        if ($this->stream)
            return $this->stream;

        $givenFileResource = $this->_c_givenResource;
        if (!$givenFileResource instanceof StreamInterface)
            $givenFileResource = new Stream($givenFileResource, 'r');
        
        return $this->stream = $givenFileResource;
    }
594379
public function getContents()
    {
        if (!$this->isReadable()) {
            return '';
        }
        rewind($this->resource);

        $result = stream_get_contents($this->resource);
        if (!$result) {
            return '';
        }
        return $result;
    }
1153817
public function getVideoDescription()
    {
        $this->ensureMediaGroupIsNotNull();
        if ($this->getMediaGroup()->getDescription() != null) {
            return $this->getMediaGroup()->getDescription()->getText();
        } else {
            return null;
        }
    }
390547
public String getContent() {
        if (content != null) {
            return content;
        }

        if (stream != null) {
            Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A");

            if (!scanner.hasNext()) {
                return "";
            }

            String data = scanner.next();
            scanner.close();

            return data;
        }

        return "";
    }
862103
public function getStream($context = null)
	{
		if (is_string($this->content)) {
			$stream = fopen('php://memory', 'r+');
			fwrite($stream, $this->content);
			rewind($stream);
			return $stream;
		}
		$fn = $this->streamFn;
		return $fn($context);
	}
484699
public function getStreamWriter()
    {
        if ($this->streamWriter !== null) {
            return $this->streamWriter;
        }

        return $this->streamWriter = new StreamWriter($this);
    }
1372322
public function getContents():string {
		if(!$this->isReadable()) {
			throw new StreamException("Stream is not readable");
		}

		$position = $this->tell();
		$this->rewind();

		$string = stream_get_contents($this->stream);
		$this->seek($position);

		return $string;
	}
707523
public function getStream($context = null)
	{
		if (is_null($context)) {
			return fopen($this->path, 'rb', false);
		} else {
			return fopen($this->path, 'rb', false, $context);
		}
	}
305487
private function getStreamContext()
    {
        $context = array(
            'ssl' => array(
                'local_cert' => $this->params['ssl_pem_path'],
            ),
        );

        // Handle Certificate Bundle passphrase
        if (!empty($this->params['ssl_passphrase'])) {
            $context['ssl']['passphrase'] = $this->params['ssl_passphrase'];
        }

        return stream_context_create($context);
    }