public function remove($index)
    {
        if (!isset($this->_streams[$index])) {
            throw new InvalidArgumentException("Unexisting stream index `{$index}`.");
        }
        $stream = $this->_streams[$index];
        unset($this->_streams[$index]);
        $this->_streams = array_values($this->_streams);
        return $stream;
    }