protected function readHeaderRaw($size)
    {
        if ($this->position + $size > $this->headerSize) {
            throw new \Exception('Can\'t read ' . $size . ' bytes');
        }
        $data = substr($this->header, $this->position, $size);
        $this->position += $size;
        return $data;
    }