(non-PHPdoc)

@see ResourceInterface::getStream()
974792
public function getStream($context = null)
	{
		$this->requestBody();
		if (is_null($context)) {
			return fopen($this->bodyTempFile, 'rb', false);
		} else {
			return fopen($this->bodyTempFile, 'rb', false, $context);
		}
	}
367381
private function getStreamByPathScheme($path)
    {
        $scheme = parse_url($path, PHP_URL_SCHEME);

        return $this->streamManager->getStream($scheme);
    }
223266
public function getStream($mediaId)
    {
        $response = $request = $this->getHttpClient()->createRequest()
            ->setUrl([
                self::API_GET,
                'media_id' => $mediaId
            ])
            ->setMethod('GET')
            ->send();
        if ($response->isOk) {
            $json = json_decode($response->content, true);
            if (JSON_ERROR_NONE === json_last_error()) {
                $this->checkAndThrow($json);
            }
        }
        return $response->content;
    }
272496
public InputStream getStream() {
        if (stream != null) {
            return stream;
        }
        try {
            return new ByteArrayInputStream(content.getBytes("utf-8"));
        } catch (final UnsupportedEncodingException e) {
            throw new ApiException("UTF-8 encoding not supported", e);
        }
    }
294269
public function getStream()
    {
        if ($this->moved === true) {
            throw new \RuntimeException('File has already been moved to disk.');
        }

        if ($this->stream instanceof StreamInterface) {
            return $this->stream;
        }

        return $this->stream = new Stream($this->stream);
    }
769381
public function getStream($mediaId)
    {
        $response = $this->getHttp()->get(self::API_GET, ['media_id' => $mediaId]);

        return $response->getBody();
    }
678566
protected function getResourceSize($inputStream)
    {
        $size = 0;

        $a = &$inputStream;

        while( !feof($a) ) {
            $str = fgets($a);
            $size += strlen($str);
        }

        fseek($inputStream, 0);

        return $size;
    }
741606
protected function getSocketStream()
    {
        if (!is_resource($this->socketResource)) {
            $this->connect();
            return $this->socketResource;
        }
        $meta = stream_get_meta_data($this->socketResource);
        if (($meta['timed_out'] || $meta['eof']))
            $this->connect();
        return $this->socketResource;
    }
185030
protected function castStream($source): StreamInterface
    {
        if ($source instanceof UploadedFileInterface || $source instanceof StreamableInterface) {
            $source = $source->getStream();
        }

        if ($source instanceof StreamInterface) {
            //This step is important to prevent user errors
            $source->rewind();

            return $source;
        }

        if (is_resource($source)) {
            return stream_for($source);
        }

        if (empty($source)) {
            //Guzzle?
            return stream_for('');
        }

        if ($this->isFilename($source)) {
            //Must never pass user string in here, use Stream
            return stream_for(fopen($source, 'rb'));
        }

        //We do not allow source names in a string form
        throw new BucketException(
            "Source must be a valid resource, stream or filename, invalid value given"
        );
    }
397841
public function getStream(){
        if(UPLOAD_ERR_OK !== $this->error){
            throw new Exception\UploadErrorException(
                static::ERROR_MAP[$this->error]
            );
        }

        if($this->moved){
            throw new Exception\UploadFileIsMovedException(
                "The uploaded file has already been moved."
            );
        }

        return $this->stream;
    }
1006315
public function getStream()
    {
        $fp = @fopen($this->getPath(), 'rb');

        if ($fp === false) {
            $msg = "Cannot retrieve QTI File Stream from '" . $this->getPath() . "'.";
            throw new RuntimeException($msg);
        }

        $len = current(unpack('S', fread($fp, 2)));
        fseek($fp, $len, SEEK_CUR);

        $len = current(unpack('S', fread($fp, 2)));
        fseek($fp, $len, SEEK_CUR);

        return $fp;
    }
1083242
public function getStream()
    {
        if ($this->stream === null) {
            return $this->streamFactory->newMessagePartStream($this);
        }
        $this->stream->rewind();
        return $this->stream;
    }
1063748
protected function createStream($socket, RequestInterface $request, ResponseInterface $response): Stream
    {
        $size = null;

        if ($response->hasHeader('Content-Length')) {
            $size = (int) $response->getHeaderLine('Content-Length');
        }

        return new Stream($request, $socket, $size);
    }
1078539
public function createInputStream(): InputStream {
		$this->ensureValid();
		try {
			return IoUtils::createSafeFileInputStream($this->fsPath);
		} catch (CouldNotAchieveFlockException $e) {
			return new FileResourceStream($this->fsPath, 'r');
		}
	}
522834
public InputStream getResourceStream(String source) throws ResourceNotFoundException {
		return IoUtil.toStream(source, CharsetUtil.CHARSET_UTF_8);
	}
668929
public function createStream($body = null)
    {
        if ($body instanceof StreamInterface)
        {
            return $body;
        }

        if (\is_resource($body))
        {
            return Stream::createFromResource($body);
        }

        return Stream::create($body ?? '');
    }
406401
public static function getStream($data)
    {
        if (!self::$_id) {
            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
        }

        return fopen(
            self::WRAPPER_NAME . '://' . ++self::$_id,
            'wb',
            false,
            stream_context_create(array(
                self::WRAPPER_NAME => array(
                    'data' => $data
                )
            ))
        );
    }