public function readLine()
    {
        $this->log->debug('going to read a line from the stream');
        $line = $this->streamReadLine($this->stream);

        if (false === $line) {
            $meta = $this->streamMeta($this->stream);
            $this->log->warning('fgets returned false', $meta);
            throw new StreamException(StreamException::OP_READ, 'stream_get_line returned false');
        }

        $this->log->debug('readLine()', [$line]);

        return $line;
    }