public function readStringNull()
    {
        $pos = \strpos($this->buffer, "\0", $this->bufferPos);
        if ($pos === false) {
            throw new \LogicException('Missing NULL character');
        }

        $ret = $this->read($pos - $this->bufferPos);
        ++$this->bufferPos;

        return $ret;
    }