public function readObject()
{
$tag = $this->stream->getc();
switch ($tag) {
case Tags::TagNull:
return null;
case Tags::TagClass:
$this->readclass();
return $this->readObject();
case Tags::TagObject:
return $this->readObjectWithoutTag();
case Tags::TagRef:
return $this->readRef();
default:
throw $this->unexpectedTag($tag);
}
}