evseevnn\Cassandra\Protocol\Response\DataStream::read PHP Method

read() protected method

Read data from stream.
protected read ( integer $length ) : string
$length integer
return string
    protected function read($length)
    {
        if ($this->length < $length) {
            throw new \Exception('Reading while at end of stream');
        }
        $output = substr($this->data, 0, $length);
        $this->data = substr($this->data, $length);
        $this->length -= $length;
        return $output;
    }