public function readBytes($isCollectionElement = false) { if ($isCollectionElement) { $this->readShort(); } $length = $this->readInt(); if ($length == -1) { return null; } return $this->read($length); }