public function readBytes($maxlen = null)
    {
        $this->log->debug('calling readbytes()', array('maxlen' => $maxlen));
        $out = $this->streamReadBytes($this->stream, $maxlen);
        $this->log->debug('readBytes()', [$maxlen, $out]);

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

        return $out;
    }