public function createStream($body = null)
	{
		if ( ! $body instanceof StreamInterface)
		{
			if (is_resource($body))
			{
				$body = new Stream($body);
			}
			else
			{
				$stream = new Stream('php://temp', 'rb+');
				
				if (null !== $body)
				{
					$stream->write((string) $body);
				}
				
				$body = $stream;
			}
		}
		
		$body->rewind();
		
		return $body;
	}
public function createStream($body = null)
	{
		if ( ! $body instanceof StreamInterface)
		{
			if (is_resource($body))
			{
				$body = new Stream($body);
			}
			else
			{
				$stream = new Stream('php://temp', 'rb+');
				
				if (null !== $body)
				{
					$stream->write((string) $body);
				}
				
				$body = $stream;
			}
		}
		
		$body->rewind();
		
		return $body;
	}
public function createStream ( $ body = null ) { if ( ! $ body instanceof StreamInterface ) { if ( is_resource ( $ body ) ) { $ body = new Stream ( $ body ) ; } else { $ stream = new Stream ( 'php://temp' , 'rb+' ) ; if ( null !== $ body ) { $ stream -> write ( ( string ) $ body ) ; } $ body = $ stream ; } } $ body -> rewind ( ) ; return $ body ; }
Create a new stream instance.

@param StreamInterface $body

@return null|\Zend\Diactoros\Stream
@throws \RuntimeException
@throws \InvalidArgumentException
Create a new stream instance .