public function addStream(StreamInterface $stream): void
    {
        if (! $stream->isReadable()) {
            throw new InvalidArgumentException('Each stream must be readable.');
        }

        // The stream is only seekable if all streams are seekable
        if (! $stream->isSeekable()) {
            $this->seekable = false;
        }

        $this->streams[] = $stream;
    }