public function read($len) { return $len >= strlen($this->readData) ? $this->readData : substr($this->readData, 0, $len); }