1<?php
2
3namespace GuzzleHttp\Psr7;
4
5use Psr\Http\Message\StreamInterface;
6
7/**
8 * Stream decorator that prevents a stream from being seeked.
9 *
10 * @final
11 */
12class NoSeekStream implements StreamInterface
13{
14    use StreamDecoratorTrait;
15
16    public function seek($offset, $whence = SEEK_SET)
17    {
18        throw new \RuntimeException('Cannot seek a NoSeekStream');
19    }
20
21    public function isSeekable()
22    {
23        return false;
24    }
25}
26