protected function readObject()
{
$ret = new stdClass();
$this->amf0storedObjects[] =& $ret;
$key = $this->readUTF();
for ($type = $this->readByte(); $type != 9; $type = $this->readByte()) {
$val = $this->readData($type);
// grab the value
$ret->{$key} = $val;
// save the name/value pair in the object
$key = $this->readUTF();
// get the next name
}
return $ret;
}