public function getRemainingData() { if ($this->isComplete()) { return 0; } try { if ($this->getCurrentFrame()->isFinal()) { return $this->getCurrentFrame()->getRemainingData(); } } catch (FrameException $e) { return null; } return null; }