public function read()
    {
        $this->ensureDeviceOpen();

        $chars = [];

        do {
            $char = fread($this->fd, 1);
            $chars[] = $char;
        } while ($char != $this->getParser()->getSeparator());

        return $this->getParser()->parse($chars);
    }